import xlrd xlsx = xlrd.open_workbook("D:/肯倍加盟工厂合作政策.xlsx") table = xlsx.sheet_by_index(0) #table = xlsx.sheet_by_index(0)# print(table.cell_value(5, 1))
报错提示如下:
"C:\Program Files\Python38\python.exe" C:/Users/Administrator/PycharmProjects/untitled/lx.py Traceback (most recent call last): File "C:/Users/Administrator/PycharmProjects/untitled/lx.py", line 2, in <module> xlsx = xlrd.open_workbook("D:/肯倍加盟工厂合作政策.xlsx") File "C:\Users\Administrator\AppData\Roaming\Python\Python38\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 Process finished with exit code 1
求助如何修改代码。那里错误了。