1// The code below logs the index of a sheet named "Expenses"
2const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Expenses")
3if (sheet != null) {
4 Logger.log(sheet.getIndex())
5}
1var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Expenses");