abelalvarez89 / xlsx-parse-json

MIT License
13 stars 4 forks source link

Fix issue where parsing a blank worksheet throws an error #12

Closed simpsonjoshua closed 2 years ago

simpsonjoshua commented 2 years ago

There is a bug where having an empty worksheet crashes the parser, and the following error is thrown:

Screen Shot 2022-06-29 at 8 59 49 AM

This occurs because desiredCells is undefined when the worksheet is empty. In cases like this we can return an empty array instead.

This also fixes: https://github.com/abelalvarez89/xlsx-parse-json/issues/10