CJones
CJones

Reputation: 627

Import Excel with bad characters to Python

I have ~300 .xls files that I need to import to Python. I've tried xlrd and pandas read_excel and both fail the import with "Unsupported format, or corrupt file: Expected BOF record; found '="XS1351'.

Roughly half the columns on each sheet have quotes and leading equalsign ="THISFORMAT"

The other half have no quotes or special characters. Any help is much appreciated

Upvotes: 0

Views: 145

Answers (1)

Will
Will

Reputation: 87

I know it's not the solution you're looking for, but you could go to CSV first, then import to Python. Here is a way to convert quickly. I have also tried to import .xls files to great frustration and ended up manually opening 25 or so of them and saving as CSV.

Upvotes: 1

Related Questions