python xlrd unsupported format, or corrupt file. python xlrd unsupported format, or corrupt file. python python

python xlrd unsupported format, or corrupt file.


Try to open it as an HTML with pandas:

import pandas as pddata = pd.read_html('filename.xls')

Or try any other html python parser.

That's not a proper excel file, but an html readable with excel.


You say:

The file doesn't seem to be corrupted or of a different format.

However as the error message says, the first 8 bytes of the file are '<table r' ... that is definitely not Excel .xls format. Open it with a text editor (e.g. Notepad) that won't take any notice of the (incorrect) .xls extension and see for yourself.


This will happen to some files while also open in Excel.