Skip to content

Commit

Permalink
ignore invalid s values
Browse files Browse the repository at this point in the history
  • Loading branch information
dilshod committed Oct 1, 2020
1 parent 27628c3 commit 8a1347a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xlsx2csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ def handleCharData(self, data):

# get cell format
format_str = "general"
xfs_numfmt = self.styles.cellXfs[s]
xfs_numfmt = None
if s < len(self.styles.cellXfs):
xfs_numfmt = self.styles.cellXfs[s]
if xfs_numfmt in self.styles.numFmts:
format_str = self.styles.numFmts[xfs_numfmt]
elif xfs_numfmt in STANDARD_FORMATS:
Expand Down

0 comments on commit 8a1347a

Please sign in to comment.