Blank sheets not included in SheetNames #292

Closed
opened 2015-08-24 21:45:30 +00:00 by GenoD · 1 comment
GenoD commented 2015-08-24 21:45:30 +00:00 (Migrated from github.com)

I have an Excel file where the first Sheet is simply an image.

excel sample

Now calling:
console.log(Workbook.SheetNames)

Prints:
"INPUT DATA", "BURST PRESSURE RESULTS", "PASSIVE PHASE", "PASSIVE IMPEDANCE", "CHART COMPARISON", "OTHER RESULTS", "Calculations and Tables", "Shape Statistics Setup A", "Shape Statistics Setup B", "Sheet1"

My assumption is that Seal Summary is left out because it contains no cells. This would be fine, however when looping through SheetNames for 'INPUT DATA' I get the incorrect index.

code sample

This code gives me an index of '0' which follows the console printout above. Using that index via SheetNames[sheetNumber] accesses "Seal Summary". In my code above I have to increment my sheet_name in order to access the correct sheet.

It seems that there is an inconsistency between SheetNames and Sheets. Therefore when parsing SheetNames for a specific name will potentially lead to me accessing the wrong Sheet. Is there currently any workaround for this?

I have an Excel file where the first Sheet is simply an image. ![excel sample](https://cloud.githubusercontent.com/assets/5068500/9450490/b7598a12-4a5d-11e5-9a67-1d03331af0e7.png) Now calling: console.log(Workbook.SheetNames) Prints: "INPUT DATA", "BURST PRESSURE RESULTS", "PASSIVE PHASE", "PASSIVE IMPEDANCE", "CHART COMPARISON", "OTHER RESULTS", "Calculations and Tables", "Shape Statistics Setup A", "Shape Statistics Setup B", "Sheet1" My assumption is that Seal Summary is left out because it contains no cells. This would be fine, however when looping through SheetNames for 'INPUT DATA' I get the incorrect index. ![code sample](https://cloud.githubusercontent.com/assets/5068500/9450702/07e95c86-4a5f-11e5-8667-d12663f829f0.png) This code gives me an index of '0' which follows the console printout above. Using that index via SheetNames[sheetNumber] accesses "Seal Summary". In my code above I have to increment my sheet_name in order to access the correct sheet. It seems that there is an inconsistency between SheetNames and Sheets. Therefore when parsing SheetNames for a specific name will potentially lead to me accessing the wrong Sheet. Is there currently any workaround for this?
SheetJSDev commented 2017-03-27 21:45:40 +00:00 (Migrated from github.com)

We pushed a change that now reads the underlying chartsheet data as worksheets with a special flag !type set to "charts". It should resolve the aforementioned issue, but we also need to support dialogsheet and macrosheet (Excel 4 Macros), so will keep issue open

We pushed a change that now reads the underlying chartsheet data as worksheets with a special flag `!type` set to `"charts"`. It should resolve the aforementioned issue, but we also need to support dialogsheet and macrosheet (Excel 4 Macros), so will keep issue open
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#292
No description provided.