Hi Randy,
I'm glad you were able to recover from that. Note that in text mode,
len(data) would be 6; the 7th byte of the 8-byte signature at the start
of the file is 0x1A which is interpteted as EOF by Windows in text mode.
It's always a good idea to open binary files (like .XLS and .CSV)
explicitly with mode='rb' irrespective of what operating system you
first run your code on.
Is there any particular reason why you open the file, read the contents,
and then pass the contents to open_workbook? If you are not inspecting
the contents yourself (virus checking??), then you are doing too much
work, and stopping open_workbook from taking advantage of memory-mapping
the file ... just pass the path to the file as the first arg. The
file_contents arg is for use e.g. on the web where the receiver gets a
bytestring and doesn't want/need to write it to disk.
Cheers,
John