|
楼主 |
发表于 2022-10-4 10:28:53
|
显示全部楼层
使用转义字符或绝对路径的方法都试过了,都不行
1)readfile=xlrd.open_workbook(r"D:\list.xlsx")
Traceback (most recent call last):
File "<pyshell#15>", line 1, in <module>
readfile=xlrd.open_workbook(r"D:\list.xlsx")
File "E:\program files\python\lib\site-packages\xlrd\__init__.py", line 170, in open_workbook
raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported
2)readfile=xlrd.open_workbook("D:\\list.xlsx")
Traceback (most recent call last):
File "<pyshell#14>", line 1, in <module>
readfile=xlrd.open_workbook("D:\\list.xlsx")
File "E:\program files\python\lib\site-packages\xlrd\__init__.py", line 170, in open_workbook
raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported |
|