ubuntu下python导入excel出现了问题 5
显示:Traceback(mostrecentcalllast):File"2.py",line35,in<module>read_excel()File"2.py",l...
显示:
Traceback (most recent call last):
File "2.py", line 35, in <module>
read_excel()
File "2.py", line 8, in read_excel
workbook = xlrd.open_workbook('demo.xlsx')
File "/usr/local/lib/python2.7/dist-packages/xlrd/__init__.py", line 435, in open_workbook
ragged_rows=ragged_rows,
File "/usr/local/lib/python2.7/dist-packages/xlrd/book.py", line 91, in open_workbook_xls
biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
File "/usr/local/lib/python2.7/dist-packages/xlrd/book.py", line 1230, in getbof
bof_error('Expected BOF record; found %r' % self.mem[savpos:savpos+8])
File "/usr/local/lib/python2.7/dist-packages/xlrd/book.py", line 1224, in bof_error
raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found '\xe4\xb8\x9a\xe5\x8a\xa1,\xe7' 展开
Traceback (most recent call last):
File "2.py", line 35, in <module>
read_excel()
File "2.py", line 8, in read_excel
workbook = xlrd.open_workbook('demo.xlsx')
File "/usr/local/lib/python2.7/dist-packages/xlrd/__init__.py", line 435, in open_workbook
ragged_rows=ragged_rows,
File "/usr/local/lib/python2.7/dist-packages/xlrd/book.py", line 91, in open_workbook_xls
biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
File "/usr/local/lib/python2.7/dist-packages/xlrd/book.py", line 1230, in getbof
bof_error('Expected BOF record; found %r' % self.mem[savpos:savpos+8])
File "/usr/local/lib/python2.7/dist-packages/xlrd/book.py", line 1224, in bof_error
raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found '\xe4\xb8\x9a\xe5\x8a\xa1,\xe7' 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询