-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: The XLS_SIGNATURE is too restrictive #41225
Comments
Thanks for the report! An example sheet would be helpful to further diagnose. |
@rhshadrach See attached. If you have any suggestions I'd be happy to put together a PR. For future reference: OpenOffice has made available the various BIFF files for testing. |
Thanks @geoffrey-eisenbarth - documentation is hard to find, but I think this is a BIFF4 format: This agrees with your code: However, it seems likely to me there are other file signatures that will still go unrecognized. One of the shortfalls of the current pandas implementation is that if the user specifies Instead, I think Would you be interested in putting up a PR for this @geoffrey-eisenbarth? |
@rhshadrach I agree with your suggested route, and I'd love to submit the PR. Hoping to have time tomorrow to dig more into the code and reference your suggestion with Thanks for your help! |
Pandas 1.2.4 fails to open XLS files generated by Lotus 1-2-3 because they have a different header than the one expected in
XLS_SIGNATURE
(io.excel._base
line 1001 and then 1050).I know I'm likely to be the only person in the world with this issue, but my boss still uses Lotus 1-2-3 🙄
I'm willing to submit a pull request with my fix if people are okay with it. The fix basically involves changing
XLS_SIGNATURE
to a list:and then later:
I don't know if the second
XLS_SIGNATURES
value is "good," but it works. I can attach an XLS that was exported by 1-2-3 if it would be beneficial to others, or if they'd be able to help me find a better second value forXLS_SIGNATURES
. I tried looking through the byte-code for anything similar to the "DOCFILE" XLS signature, but didn't see anything.The text was updated successfully, but these errors were encountered: