You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, I don't know how to recreate such a *.xlsb file from scratch, and can't share the file I have due to confidentiality reasons. Hopefully the debug output is enough for anyone interested to identify the problem.
The text was updated successfully, but these errors were encountered:
pallxk
changed the title
open_workbook throws KeyError(None) when workbook contains sheet with rId == None
open_workbook throws KeyError(None) when workbook contains sheet with rId being None
Aug 27, 2023
Do you know where that workbook is coming from? Was it generated by Excel or some other application?
I'd have to recheck it, but I don't think this is valid per the MS-XLSB spec, so it could be a bug in the data reader or it could just genuinely be a corrupted file.
I believe It's generated/created with Excel and edited with it but I'm not sure how it evolves into that state.
Opening the file with MS Excel will not report any error. I'm not familiar with MS-XLSB spec, but I fully understand your concern on this. I'm still trying to understand how an xlsb can be modified with Excel into such a state. I'll share once I've found out the reproducing steps or got files that I'm allowed to share.
When a workbook contains sheet with rId being None,
open_workbook
throwsKeyError(None)
.Related code:
pyxlsb/pyxlsb/workbook.py
Lines 43 to 47 in 7dca940
And some debug output:
(I've masked all sheet names with values as
'*'
.)For now, I don't know how to recreate such a *.xlsb file from scratch, and can't share the file I have due to confidentiality reasons. Hopefully the debug output is enough for anyone interested to identify the problem.
The text was updated successfully, but these errors were encountered: