Decimating Excel files

gonzlobo gonzlobo at gmail.com
Mon Feb 5 21:19:32 EST 2007


I tried to open the file with Kate, trust me, it's an Excel file.

I'm using xlrd, it works beautifully (although come to think of it, I
haven't tried writing to an .xls file yet... hmmm)

> To clear up the doubts, I'd suggest that the OP do something like this
> at the Python interactive prompt:
>
> print repr(open('nasty_file.xls', 'rb').read(512))
>
> If that produces recognisable stuff, then it's a CSV file (or a tab
> separated file) masquerading as an XLS file.



More information about the Python-list mailing list