注册

使用dmPython导出大字段text类型到Excel报错Cannot convert dmPython.LOB object

kay 2022/08/18 145 1

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:–03134283890-20220525-161267-10045 Pack7
【操作系统】:
【CPU】:
【问题描述】*:

在使用dmPython需要把包含大字段的表导出形成Excel,目前表含有text类型,异常抛出如下:

Traceback (most recent call last): File "/opt/python_code/code_demo/dm_cluster.py", line 131, in <module> read_mysql_to_xlsx(sql, 'log_commit') File "/opt/python_code/code_demo/dm_cluster.py", line 121, in read_mysql_to_xlsx ws1.cell(row=i, column=j + 1, value=jb_date_list[i - 2][j]) File "/opt/anaconda3/lib/python3.7/site-packages/openpyxl/worksheet/worksheet.py", line 241, in cell cell.value = value File "/opt/anaconda3/lib/python3.7/site-packages/openpyxl/cell/cell.py", line 252, in value self._bind_value(value) File "/opt/anaconda3/lib/python3.7/site-packages/openpyxl/cell/cell.py", line 218, in _bind_value raise ValueError("Cannot convert {0!r} to Excel".format(value)) ValueError: Cannot convert <dmPython.LOB object at 0x7f7d46a301d0> to Excel
回答 0
暂无回答
扫一扫
联系客服