用pandas和xlrd读取xls都会出现最后两句话,网上的办法都试过,请问到底要怎么解决呢
>>> ll=pd.read_excel(r'C:\Users\Administrator\Desktop\12311.xlsx')Traceback (most recent call last):
File "<pyshell#321>", line 1, in <module>
ll=pd.read_excel(r'C:\Users\Administrator\Desktop\12311.xlsx')
File "D:\python\lib\site-packages\pandas\util\_decorators.py", line 296, in wrapper
return func(*args, **kwargs)
File "D:\python\lib\site-packages\pandas\io\excel\_base.py", line 304, in read_excel
io = ExcelFile(io, engine=engine)
raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found b'PF\tGDZ\tS' 可能是因为直接改文件后缀名引起的,把xlsx文件另存成xls,试一下 弱弱的佳佳 发表于 2020-9-27 15:00
可能是因为直接改文件后缀名引起的,把xlsx文件另存成xls,试一下
解决了,谢谢啦 归榆 发表于 2020-9-27 15:48
解决了,谢谢啦
反手一个最佳答案{:10_264:}
页:
[1]