Excel 创建、导出错误,谁帮忙解决一下
使用的 Office,单元格写入没有问题,
Excel 创建和导出 Excel 报错,设计的功能是 读取网页的表格,写入变量,然后间该变量写入 Excel
错误日志如下:
2020-03-26 20:44:16,131 - F:/Program Files/MyProjects/wanghq\codes\Main.py - Flow:outputxlx,StepNodeTag:2620194295147,Note:
0 1 2 3 4 5 6 7
0 产品代码 产品名称 销售日 结息日 视频保存时间 (月) 状态 描述 操作
1 i-Search-05-20200319-12730 a003 NaN NaN 3 正常 NaN NaN
2 i-Search-30-20200319-44173 a002 NaN NaN 3 正常 NaN NaN
3 i-Search-30-20200319-51607 a002 NaN NaN 4 正常 NaN NaN
4 i-Search-19-20200319-58778 a003 NaN NaN 7 正常 NaN NaN
5 i-Search-19-20200319-83714 a007 NaN NaN 3 正常 NaN NaN
6 i-Search-19-20200319-88058 a007 NaN NaN 1 正常 NaN NaN
7 i-Search-19-20200319-13273 a006 NaN NaN 7 正常 NaN NaN
8 i-Search-17-20200319-32821 a009 NaN NaN 3 正常 NaN NaN
9 i-Search-05-20200319-91473 a002 NaN NaN 9 正常 NaN NaN
10 i-Search-16-20200319-20419 a001 NaN NaN 3 正常 NaN NaN
11 i-Search-09-20200319-40926 a009 NaN NaN 1 正常 NaN NaN
12 i-Search-09-20200319-23339 a001 NaN NaN 4 正常 NaN NaN
13 i-Search-09-20200319-89039 a002 NaN NaN 7 正常 NaN NaN
14 i-Search-01-20200319-24985 a001 NaN NaN 3 正常 NaN NaN
15 i-Search-02-20200319-46120T T NaN NaN 5 正常 NaN NaN
2020-03-26 20:44:16,138 - F:/Program Files/MyProjects/wanghq\codes\Main.py - Flow:outputxlx,StepNodeTag:2620150326843,Note:
Traceback (most recent call last):
File “F:/Program Files/MyProjects/wanghq\codes\Main.py”, line 177, in
pro.Main()
File “F:/Program Files/MyProjects/wanghq\codes\Main.py”, line 150, in Main
(temptemp)=self.outputxlx()
File “F:/Program Files/MyProjects/wanghq\codes\Main.py”, line 136, in outputxlx
icsv.write_excel(path=‘F:/webdf1.xlsx’,df=self.dfall)
File “F:\Program Files\IS-RPA2020\Python\lib\ubpa\icsv.py”, line 171, in write_excel
File “F:\Program Files\IS-RPA2020\Python\lib\ubpa\icsv.py”, line 163, in write_excel
File “F:\Program Files\IS-RPA2020\Python\lib\site-packages\xlwings\main.py”, line 479, in init
app = App(add_book=False)
File “F:\Program Files\IS-RPA2020\Python\lib\site-packages\xlwings\main.py”, line 204, in init
self.impl = xlplatform.App(spec=spec, add_book=add_book)
File “F:\Program Files\IS-RPA2020\Python\lib\site-packages\xlwings_xlwindows.py”, line 288, in init
self.xl = COMRetryObjectWrapper(DispatchEx(‘Excel.Application’))
File "F:\Program Files\IS-RPA2020\Python\lib\site-packages\win32com\client_init.py", line 113, in DispatchEx
dispatch = pythoncom.CoCreateInstanceEx(clsid, None, clsctx, serverInfo, (pythoncom.IID_IDispatch,))[0]
pywintypes.com_error: (-2147221005, ‘无效的类字符串’, None, None)
运行异常
回帖内容已被屏蔽。
看时间。
解决了,按他说的去做就行
你这是高阶培训?
解决没有啊这个问题,我也遇到这个问题
你说的正确 ~ 有用
这也太。。。。。。坑了把,这样浪费啊。而且万一有数据呢
找 Offfice 清理工具卸载 Office, 卸载 RPA, 找清理工具彻底清理
然后重新安装 RPA 和 Office
问题就解决了.
先选中工程名称,右侧属性栏的位置可以看到管理员权限的 checkbox,把勾去掉,重启设计器再试一下
打开 excel 了, 没有用
您说的 "去掉管理员运行勾选" 没有弄清楚怎么操作,
能详细说一下吗.
谢谢
打开 Excel 应用或者去掉管理员运行勾选即可。