-
Notifications
You must be signed in to change notification settings - Fork 47
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
Index out of range #13
Comments
Haven't tested it, but I think maybe your for loop should be < instead of <= (because zero based). |
@dougwinsby interesting, i'll check that. However, this is an example given by the author in the README |
I would try upgrading to 0.9.8. (See #8) |
@dougwinsby I have tried both -- using
|
@dfurmanov thanks for finding this bug! |
@shakinm unfortunately I have no control over the files I am processing with this library so hopefully the fix will be out soon. Thank you very much for working on this! |
I've been looking into this issue for the past day and I found a couple of things. Line 83 in cb2bf40
The header size here is hardocoded to be 3, when the size can actually vary depending on the flags set. When I fix it, @dfurmanov's file opens correctly. However, this did not fix all of my problems because for some documents it fails to read strings broken up by a CONTINUE record. Microsoft docs claim that CONTINUE record has to contain flags field as its first byte, however I found some documents where flags byte is missing if the CONTINUE record begins in the formatting run. I checked openoffice xls documentation and indeed it does mention this quirk(section 5.21):
Seems to be poor documentation on Microsoft's part. When I fixed this issue, I no longer had any problems with reading SST records. Going to do a PR. |
Version 0.9.7
Stack trace
My code (sheetIndex = 0)
Input file
error.xls.zip
The text was updated successfully, but these errors were encountered: