Google apps script 如何使用应用程序脚本在Google Spreadsheet中移动工作表

Google apps script 如何使用应用程序脚本在Google Spreadsheet中移动工作表,google-apps-script,google-sheets,Google Apps Script,Google Sheets,我想使用应用程序脚本在电子表格集中移动工作表。 怎么做 最好的生活 你看过吗 它也显示了一个示例: // This example assumes there are two sheets in the current // active spreadsheet: one named "first", and another named "second", // and that the current active sheet (first) is in position 1 var

我想使用应用程序脚本在电子表格集中移动工作表。 怎么做

最好的生活

你看过吗

它也显示了一个示例:

 // This example assumes there are two sheets in the current
 // active spreadsheet: one named "first", and another named "second",
 // and that the current active sheet (first) is in position 1
 var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
 var sheet = spreadsheet.getSheetByName("first");

 // This should output 'Current index of sheet: 1'
 Logger.log("Current index of sheet: %s", sheet.getIndex());

 spreadsheet.moveActiveSheet(2);

 // This should output 'New index of sheet: 2'
 Logger.log("New index of sheet: %s", sheet.getIndex());

哇!只有活动表!好啊谢谢不激活表单是否可能?@Rubén这个问题的标题更相关、更纯粹。不是吗?也许吧,但身体是问题最重要的部分。