jsonkenl / xlsxir

Xlsx parser for the Elixir language.
MIT License
215 stars 85 forks source link

Fix MatchError when no Styles Exist for Cell #95

Closed barakyo closed 5 years ago

barakyo commented 5 years ago

This address #94

This fixes an error when no styles exist for a cell and we were getting a MatchError due to assuming that Enum.filter call in sax_event_handler would always return at least one element. To fix the error, we're a little safer when handling the result of Enum.filter if a tuple is returned, continue with the existing happy path. In the case that nothing is returned, we simply append a '0' to indicate that there are no styles for that current cell.

Changes: