0
votes

I would like to activate all hiden sheets by using google app script.

I tried:

SpreadsheetApp.getActiveSpreadsheet().getSheetByName(„xxx“ &&“yyy“).activate ();

And i try it also for every sheet separate

1

1 Answers

1
votes

Explanation:

I assume you mean you want to unhide all the sheets.

  • You can use showSheet() for every sheet since this function has no effect on a sheet that is already visible.

  • Use getSheets() to get all the sheets and then forEach to unhide every sheet in the spreadsheet file.

Solution:

function unhideAllSheets() {
   SpreadsheetApp.getActive().getSheets().forEach(sh=>sh.showSheet()); 
}