sheetjs/docbits/73_sheetprops.md
SheetJS 97f7c1d4bf sheet visibility
- XLSB read V H VH + write V H VH
- XLSX read V H VH + write V H VH
- XLML read V H VH + write V H VH
- XLS  read V H VH

- fixes #123 h/t @rla-dev @Mior
- fixes #464 h/t @enobufs @thowk
- fixes #498 h/t @digity
- fixes #503 h/t @digity
2017-03-31 14:46:42 -04:00

1.1 KiB

Sheet Visibility

Excel enables hiding sheets in the lower tab bar. The sheet data is stored in the file but the UI does not readily make it available. Standard hidden sheets are revealed in the unhide menu. Excel also has "very hidden" sheets which cannot be revealed in the menu. It is only accessible in the VB Editor!

The visibility setting is stored in the Hidden property of the sheet props array. The values are:

Value Definition
0 Visible
1 Hidden
2 Very Hidden

With https://rawgit.com/SheetJS/test_files/master/sheet_visibility.xlsx:

> wb.Workbook.Sheets.map(function(x) { return [x.name, x.Hidden] })
[ [ 'Visible', 0 ], [ 'Hidden', 1 ], [ 'VeryHidden', 2 ] ]

Non-Excel formats do not support the Very Hidden state. The best way to test if a sheet is visible is to check if the Hidden property is logical negation:

> wb.Workbook.Sheets.map(function(x) { return [x.name, !x.Hidden] })
[ [ 'Visible', true ], [ 'Hidden', false ], [ 'VeryHidden', false ] ]