スプレッドシートを取得する

アクティブなスプレッドシートを取得

SpreadsheetApp.getActiveSpreadSheet();

IDからスプレッドシートを取得

SpreadsheetApp.openById(ID);