ReferenceError: “Sheets” is not defined
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is my first attempt with script editor. I was assigned to do a script to crate pivot table for google sheet. //creating pivot table through script editor for google sheet function addPivotTable() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheetName = "Sheet1"; // Create a new sheet which will contain our Pivot Table var pivotTableSheet = ss.insertSheet(); var pivotTableSheetId = pivotTableSheet.getSheetId(); // Add Pivot Table to new sheet // Meaning we send an 'updateCells' request to the Sheets API // Specifying via 'start'