[Google Apps Script] Get a Sheet object by name

Created on November 30, 2026

Call getSheetByName on a Spreadsheet to look up a tab by name. The example gets the active spreadsheet and looks for a sheet named something. The method returns null if the sheet does not exist.

function getSheetObjectByName() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('something');
}
Google Apps Script