-
-
Notifications
You must be signed in to change notification settings - Fork 39
hideSheet
Julian Halliwell edited this page Feb 27, 2025
·
3 revisions
Hides the specified sheet from the UI. If a sheet name or number is not specified, the currently active sheet will be hidden.
hideSheet( workbook[, sheetName[, sheetNumber] ] )
-
workbook
spreadsheet object
-
sheetName
string: the name of the sheet to hide OR -
sheetNumber
numeric: the number (1 based, not zero-based) of the sheet to hide
Chainable? Yes.
- Your spreadsheet must have at least one visible sheet. In other words, this function will not work on the last visible sheet.
spreadsheet = New spreadsheet.spreadsheet()
data = [ [ "a", "b" ], [ "c", "d" ] ]
path = ExpandPath( "test.xlsx" )
workbook = spreadsheet.newXlsx( "SheetToHide" )
spreadsheet.addRows( workbook, data )
.createSheet( workbook, "SheetToShow" )
.hideSheet( workbook, "SheetToHide" )
.write( workbook, path, true )