Read Xlsx file with custom sheet name
See original GitHub issueI am working on an application that would allow users to import data from spreadsheet files generated by another application. These spreadsheets have a single worksheet with the name ‘Course Roster’.
When trying to read the file, I get the following error:
Error: Sheet "1" not found in *.xlsx file. at readXlsx (/.../node_modules/read-excel-file/commonjs/readXlsx.js:49:11) at readXlsxFileContents (/.../node_modules/read-excel-file/commonjs/readXlsxFileContents.js:22:38) at /.../node_modules/read-excel-file/commonjs/readXlsxFileNode.js:33:47 at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
I would appreciate any suggestions.
Update:
After doing some additional troubleshooting, I think I have isolated the problem to the file format the other application is using for export. When I open the originally generated file in Excel and save it, Read Excel File is able to parse it.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Added support for reading sheets by names. https://github.com/catamphetamine/read-excel-file#advanced
OK Thank you very much for your kindness