0
サブ関数から変数を呼び出そうとしていますが、 "シート"は定義されていません。どのようにそれを呼び出すための任意の提案?他の関数から変数を呼び出す
function getDate(){
var mnthYearDate = Utilities.formatDate(new Date,"EST","MMM yyyy");
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(mnthYearDate);
}
function getValue(){
getDate();
var target = sheet.getRange("A1").getValue();
}
この投稿はあなたに役立ちます:https://stackoverflow.com/questions/24721226/how-to-define-global-variable-in-google-apps-script –