I am trying to implement the following function on Open sheet but I want to change the tab color on all the sheets. With this function, it allows me to change color only to single tab.
function getFirstEmptyRow() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheetname = "Section A";
var sheet = ss.getSheetByName(sheetname);
var column = sheet.getRange('F:F');
var values = column.getValues(); // get all data in one call
var ct = 0;
while ( values[ct][0] != "" ) {
ct++;
}
Logger.log("Row "+ ct);
var ax=sheet.getRange(ct, 7).getValue();
if(ax == ""){
sheet.setTabColor("ff0000")
} else {
sheet.setTabColor(null)
}
}