catamphetamine / read-excel-file

Read *.xlsx files in a browser or Node.js. Parse to JSON with a strict schema.
https://catamphetamine.gitlab.io/read-excel-file/
MIT License
301 stars 52 forks source link

Is this module supports xls files ? #46

Closed shubhv1 closed 5 years ago

shubhv1 commented 5 years ago

Simple xls are supporting but complex like along with spreadsheets are not supported. Giving me this error Uncaught (in promise) TypeError: Cannot read property 'nodeType' of undefined at Function.push../node_modules/xpath/xpath.js.PathExpr.getRoot (xpath.js:1448) at

catamphetamine commented 5 years ago

This module doesn't support XLS files. The module name might be misleading but that's how it was originally called.

shubhv1 commented 5 years ago

Thanks for the response. Then how to handle error? Like I want to show error if there is any error or file format is wrong.

catamphetamine commented 5 years ago

I guess the only way is checking file extension when a user selects the file in their browser (or check file path in Node.js).