|

楼主 |
发表于 2023-8-30 22:30:45
|
显示全部楼层
- ---------------------------------------------------------------------------
- com_error Traceback (most recent call last)
- <ipython-input-2-8a865c2ae754> in <module>
- 5
- 6 # 打开加密的Excel文件
- ----> 7 workbook = excel_app.Workbooks.Open('asd.xlsx', Password='1122')
- 8
- 9 # 将整张表另存为新文件
- ~\AppData\Local\Temp\gen_py\3.8\00020813-0000-0000-C000-000000000046x0x1x9\Workbooks.py in Open(self, Filename, UpdateLinks, ReadOnly, Format, Password, WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify, Converter, AddToMru, Local, CorruptLoad)
- 73 , Editable=defaultNamedOptArg, Notify=defaultNamedOptArg, Converter=defaultNamedOptArg, AddToMru=defaultNamedOptArg, Local=defaultNamedOptArg
- 74 , CorruptLoad=defaultNamedOptArg):
- ---> 75 ret = self._oleobj_.InvokeTypes(1923, LCID, 1, (13, 0), ((8, 1), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17), (12, 17)),Filename
- 76 , UpdateLinks, ReadOnly, Format, Password, WriteResPassword
- 77 , IgnoreReadOnlyRecommended, Origin, Delimiter, Editable, Notify
- com_error: (-2147352567, '发生意外。', (0, 'Microsoft Excel', '抱歉,无法找到 asd.xlsx。是否可能被移动、重命名或删除?', 'xlmain11.chm', 0, -2146827284), None)
复制代码 还是不行呢 |
|