我有兩個谷歌應用程序腳本函數(普魯托拉夫托最終forqbse()和我的函數())獨立工作正常,但我想將這兩個功能組合成一個谷歌應用程序腳本。如果我確實將它們組合在一起,我的函數()不會移動列我可以將它們作為不同的腳本單獨運行,并且我的函數()工作。function plootorawtofinalforqbse() {var sheet = SpreadsheetApp.getActive();var lastCol = sheet.getLastColumn();var keep = [1,4,21]; // array of column numbers to keepsheet.deleteRow(1);for (var col=lastCol; col > 0; col--) {if (keep.indexOf(col) == -1) {// This isn't a keeper, delete itsheet.deleteColumn(col);SpreadsheetApp.flush(); }} };function myFunction() {const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Transaction Details");sheet.moveColumns(sheet.getRange("A1"), 3);}如何將它們放在一個谷歌應用程序腳本中?
谷歌表格功能不會在另一個功能后運行
白衣非少年
2022-09-23 09:35:47
