我有两个谷歌应用程序脚本函数(普鲁托拉夫托最终forqbse()和我的函数())独立工作正常,但我想将这两个功能组合成一个谷歌应用程序脚本。如果我确实将它们组合在一起,我的函数()不会移动列
我可以将它们作为不同的脚本单独运行,并且我的函数()工作。
function plootorawtofinalforqbse() {
var sheet = SpreadsheetApp.getActive();
var lastCol = sheet.getLastColumn();
var keep = [1,4,21]; // array of column numbers to keep
sheet.deleteRow(1);
for (var col=lastCol; col > 0; col--) {
if (keep.indexOf(col) == -1) {
// This isn't a keeper, delete it
sheet.deleteColumn(col);
SpreadsheetApp.flush();
}
}
};
function myFunction() {
const sheet =
SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Transaction Details");
sheet.moveColumns(sheet.getRange("A1"), 3);
}
如何将它们放在一个谷歌应用程序脚本中?
慕田峪9158850
相关分类