Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How do I modify my script to unhide all sheets subject to multiple exceptions?

$
0
0

How would I modify this script to make multiple exceptions not just for one sheet? I am trying to unhide all sheets except for a few not just for one sheet.

function main(){   activateAllSheetsExcept('Scripts');}function activateAllSheetsExcept(sheetName) {  var sheets=SpreadsheetApp.getActiveSpreadsheet().getSheets();  for(var i =0;i<sheets.length;i++){    Logger.log(i);    if(sheets[i].getName()!=sheetName){      sheets[i].showSheet();    }  }}

Original thread: https://stackoverflow.com/q/38671585/21143626


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>