openById
openById is a method used in Google Apps Script to open a Google Drive file by its unique identifier. It is implemented in several Apps Script services, most commonly DocumentApp, SpreadsheetApp, and SlidesApp, and it returns a service-specific object that represents the opened file.
When you call openById with a file’s ID, Apps Script resolves the ID and returns an object
Typical usage includes opening documents, spreadsheets, or presentations by ID, then performing further operations. For example,
Alternatives to openById include openByUrl, which takes a full URL to the file, and using DriveApp methods