|
楼主 |
发表于 2024-6-22 14:06:47
|
显示全部楼层
Traceback (most recent call last):
File "D:\anaconda3\Lib\site-packages\xlwings\_xlwindows.py", line 719, in __call__
return Book(xl=self.xl(name_or_index))
^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda3\Lib\site-packages\xlwings\_xlwindows.py", line 223, in __call__
v = self._inner(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda3\Lib\site-packages\win32com\client\dynamic.py", line 226, in __call__
self._oleobj_.Invoke(*allArgs), self._olerepr_.defaultDispatchName, None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pywintypes.com_error: (-2147352567, '发生意外。', (0, None, None, None, 0, -2147352565), None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\anaconda3\Lib\site-packages\xlwings\main.py", line 5017, in open
impl = self.impl(name)
^^^^^^^^^^^^^^^
File "D:\anaconda3\Lib\site-packages\xlwings\_xlwindows.py", line 721, in __call__
raise KeyError(name_or_index)
KeyError: '2.周督促会-业务一部(6月14日).xlsx'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PyCharm\excel_merge\excel_merge\.venv\Lib\site-packages\extract.py", line 43, in <module>
merge_excel_files(file_list, 'Sheet1', output_file)
File "D:\PyCharm\excel_merge\excel_merge\.venv\Lib\site-packages\extract.py", line 16, in merge_excel_files
wb = xw.Book(file)
^^^^^^^^^^^^^
File "D:\anaconda3\Lib\site-packages\xlwings\main.py", line 911, in __init__
impl = app.books.open(
^^^^^^^^^^^^^^^
File "D:\anaconda3\Lib\site-packages\xlwings\main.py", line 5024, in open
impl = self.impl.open(
^^^^^^^^^^^^^^^
File "D:\anaconda3\Lib\site-packages\xlwings\_xlwindows.py", line 752, in open
xl=self.xl.Open(
^^^^^^^^^^^^^
File "D:\anaconda3\Lib\site-packages\xlwings\_xlwindows.py", line 109, in __call__
v = self.__method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<COMObject <unknown>>", line 5, in Open
pywintypes.com_error: (-2147352567, '发生意外。', (0, 'Microsoft Excel', 'Excel 无法打开文件“2.周督促会-业务一部(6月14日).xlsx”,因为文件格式或文件扩展名无效。请确定文件未损坏,并且文件扩展名与文件的格式匹配。', 'xlmain11.chm', 0, -2146827284), None)
|
|