使用xlrd读取excel文件代码如下:
import xlrd
filename='./xxxx.xlsx'
data = xlrd.open_workbook(filename)
报错如下:
--------------------------------------------------------------------------- XLRDError Traceback (most recent call last) <ipython-input-7-7a969c306a8d> in <module> 1 import xlrd 2 filename='./xxxx.xlsx' ----> 3 data = xlrd.open_workbook(filename) ~/anaconda/anaconda3/lib/python3.8/site-packages/xlrd/__init__.py in open_workbook(filename, logfile, verbosity, use_mmap, file_contents, encoding_override, formatting_info, on_demand, ragged_rows, ignore_workbook_corruption) 168 # files that xlrd can parse don't start with the expected signature. 169 if file_format and file_format != 'xls': --> 170 raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not s