google-apps-scriptgoogle-sheets

Get Google Sheet by ID?


I know that Google Apps Script has a getSheetId() method for the Sheet Class, but is there any way to select a sheet within a spreadsheet by referencing the ID?

I don't see anything like getSheetById() in the Spreadsheet Class documentation.


Solution

  • The Spreadsheet object now has a getSheetById() method.