Pyexcel-xls errors trying to read a very old version of Excel (‘95)
Closed this issue · 4 comments
I’m trying to read in a spreadsheet that’s saved in Excel ‘95 .xls format and I’m getting a bad character error.
If this is a known issue with compatibility, just let me know. But if it’s supposed to work, I can post the error message and a test case.
So the story gets stranger... If I try to run my script on the original spreadsheet, I get this error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 4: ordinal not in range(128)
However, if I simply open that file in Excel (I'm using Office 265 on the Mac), and I save it back as that very same format (Microsoft Excel 5.0/95 Workbook) and I then try to open the file again, it works just fine.
So now I'm thinking it has something to do with the whatever computer saved this file in the first place (I don't have control over that, it's sent to me this way). Unfortunately, I can't post the spreadsheet as it contains personal information and if I try to redact it and save it, the act of saving the file fixes the problem...
BTW, here's my script:
#!/usr/bin/env python3
import pyexcel
workbook = pyexcel.save_as(file_name='test.xls', dest_file_name='test.xlsx')
thanks for reporting. it is a pity that I have responded in time. I suppose everything is OK now.
I was able to use xlrd and xlwt to get around this bug so I never went back to figure out what was broken with Pyexcel-xls.
Unless someone has looked at it, I'm assuming the bug is still there...
-Erich
Underneath it uses xlwt and xlrd, so it could be version problem. Any way, no reproduction is hard to fix. Let’s wait for next report with reproducing artifacts.