写入excel出现这样的错误提示是什么原因哈
回答
收藏

写入excel出现这样的错误提示是什么原因哈

華
華
2023-11-03 18:13·浏览量:672
華
華
发布于 2023-11-03 18:13672浏览

<built-in method Invoke of PyIDispatch object at 0x01EC871C> returned a result with an error set

TypeError: must be real number, not WpsWorkBook


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

 File "E:\ShadowBot\shadowbot-5.13.33\python\lib\runpy.py", line 193, in _run_module_as_main

   "__main__", mod_spec)

 File "E:\ShadowBot\shadowbot-5.13.33\python\lib\runpy.py", line 85, in _run_code

   exec(code, run_globals)

 File "E:\ShadowBot\shadowbot-5.13.33\python\lib\site-packages\xbot_interpreter.py", line 94, in <module>

   main()

 File "E:\ShadowBot\shadowbot-5.13.33\python\lib\site-packages\xbot_interpreter.py", line 53, in main

   try:

 File "C:\Users\pc\AppData\Local\ShadowBot\users\604842619705757698\apps\8cf080d1-ea77-482d-a55f-4fc211ccf798\xbot_robot\main.py", line 145, in main

   xbot_visual.excel.write_data_to_workbook(workbook=TENICOREUS日报, write_range="area", write_way="append", write_column_way="override", row_num="4", column_name="F", begin_row_num="0", begin_column_name="", content=excel_instance, sheet_name="流量", write_as_text_cols=None, _block=("main", 83, "写入内容至Excel工作表"))

 File "<string>", line 89, in wrapper

 File "<string>", line 84, in wrapper

 File "<string>", line 299, in write_data_to_workbook

 File "<string>", line 194, in set_range

 File "E:\ShadowBot\shadowbot-5.13.33\python\lib\site-packages\win32com\client\dynamic.py", line 565, in __setattr__

   self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value)

SystemError: <built-in method Invoke of PyIDispatch object at 0x01EC871C> returned a result with an error set


收藏
全部回答(1)
最新
发布回答
回答