Hide a sheet

Here is how to hide a sheet.

 

Source code

function hideSheet() {
  var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  var sh = spreadsheet.getActiveSheet();
  sh.hideSheet();
  Browser.msgBox("The following sheet is hidden:" + sh.getName());
}

 

Format

SheetObject.hideSheet()

 

How to get sheet object?

The following posts will help you to solve problems you face.

Get sheet name and sheet id

Get sheet object by name

Select a sheet

Leave a Comment