How do you hide a sheet? #498

Closed
opened 2016-11-11 20:01:07 +00:00 by bparousis · 1 comment
bparousis commented 2016-11-11 20:01:07 +00:00 (Migrated from github.com)

I tried something like this where I read in a spreadsheet and set the state of the 4th sheet to 'hidden'. My expectation was that it would be hidden in 'HideSheet2.xlsx', but it wasn't. Is there a way to hide a sheet with this library?

var xlsx = require('xlsx');
var wb = xlsx.readFile('HideSheet.xlsx');
wb.Workbook.Sheets[3].state = 'hidden';
xlsx.writeFile(wb, 'HideSheet2.xlsx');
I tried something like this where I read in a spreadsheet and set the state of the 4th sheet to 'hidden'. My expectation was that it would be hidden in 'HideSheet2.xlsx', but it wasn't. Is there a way to hide a sheet with this library? ``` var xlsx = require('xlsx'); var wb = xlsx.readFile('HideSheet.xlsx'); wb.Workbook.Sheets[3].state = 'hidden'; xlsx.writeFile(wb, 'HideSheet2.xlsx'); ```
bparousis commented 2016-11-18 21:23:55 +00:00 (Migrated from github.com)

Here's the fix if anyone is interested:
https://github.com/SheetJS/js-xlsx/pull/503

Here's the fix if anyone is interested: https://github.com/SheetJS/js-xlsx/pull/503
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#498
No description provided.