python - XLRDError: Unsupported format, or corrupt file: Expected BOF record; -


i trying open workbook through xlrd.

import xlrd workbook=xlrd.open_workbook("d:\book1.xlsx") 

but throwing error below:

traceback (most recent call last): file "c:\users\testuser\documents\netbeansprojects\newpythonproject\src\newpythonproject.py", line 18, i`enter code here`n <module> workbook=xlrd.open_workbook("d:\book1.xlsx")   file "d:\xlrd-0.7.1\xlrd\__init__.py", line 429, in open_workbook biff_version = bk.getbof(xl_workbook_globals)   file "d:\xlrd-0.7.1\xlrd\__init__.py", line 1545, in getbof bof_error('expected bof record; found %r' % self.mem[savpos:savpos+8])    file "d:\xlrd-0.7.1\xlrd\__init__.py", line 1539, in bof_error raise xlrderror('unsupported format, or corrupt file: ' + msg) xlrd.biffh.xlrderror: unsupported format, or corrupt file: expected bof record; found 'pk\x03\x04\x14\x00\x06\x00' 

i running in netbeans python plugin. if version of xlrd issue need link download latest version of xlrd in windows. me situation.

it looks using xlrd-0.7.1 rather old - latest version xlrd-0.9.3. testing shows 0.7.1 can not open .xlxs files can opened using 0.9.3, it's time upgrade.

you can pypi: xlrd-0.9.3. don't think msi available, should able install first extracting tarball , running python setup.py install.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -