I am using the current function (triggered my a menu button) to hide a range of columns. I wanted to add some script which will also protect this hidden range (so that only the owner can edit).
My question is, how can I add the protection element to this function and also force the function to run over all of my tabs excluding X, Y, Z
etc... I have been trying to get this working for hours but just cant quite seem to crack it.
function hideResults() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
sheet.hideColumns(3,27); // B-D, three columns starting from 2nd
sheet.hideRows(4,1)
sheet.hideRows(32,2)
}