Skip to content
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

Work around malformed inlineStr data #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ErwinJunge
Copy link

When reading a rather complex excel file (that I can't share due to NDA) I ran into an IndexError on an inlineStr node. I have no idea what that means exactly, thus the current work around.

Do you have any comments on whether this is a good idea?

@staale
Copy link
Owner

staale commented Feb 16, 2015

Would it be possible to rewrite this to do checks rather than rely on exception handling?

@ErwinJunge
Copy link
Author

Ofcourse we could do if len(columnNode) > 0 and len(columnNode[0]) > 0, but that would just make the code harder to read. This seems to me like we're dealing with malformed data and thus an exceptional situation, for which exception handling is the right way to go.

My original question still stands however. Is this a good idea in the first place? I.e. is this a malformed xlsx document or should we perhaps be looking at a different location in the xml? I don't have in-depth knowledge of the used xml format, so I don't know which is the case here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants