getsheetbyname
var sheet = SpreadsheetApp.getActive().getSheetByName('Local')
SubZ390
var sheet = SpreadsheetApp.getActive().getSheetByName('Local')
// The code below logs the index of a sheet named "Expenses"
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Expenses")
if (sheet != null) {
Logger.log(sheet.getIndex())
}