question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Read Xlsx file with custom sheet name

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
catamphetaminecommented, Sep 30, 2018

Added support for reading sheets by names. https://github.com/catamphetamine/read-excel-file#advanced

0reactions
lkittyzaacommented, Mar 13, 2019

OK Thank you very much for your kindness

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reading xls files with varying sheet name - Alteryx Community
Solved: Hi, I want to use the dynamic tool to input an xls file that has different sheet names daily. The option i...
Read more >
read.xlsx: Read from an Excel file or Workbook object - Rdrr.io
In openxlsx: Read, Write and Edit xlsx Files ... object or URL to xlsx file. sheet. The name or index of the sheet...
Read more >
perl script to read an xlsx file(which has many sheets) using ...
I want to open the particular sheet within the Excel file by using the sheet name. And then read the data from that...
Read more >
Read xls and xlsx files — read_excel • readxl
Path to the xls/xlsx file. sheet. Sheet to read. Either a string (the name of a sheet), or an integer (the position of...
Read more >
R xlsx package : A quick start guide to manipulate Excel files ...
Read an Excel file · read.xlsx preserves the data type. It tries to guess the class type of the variable corresponding to each...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found