如何使用应用脚本在Google Spreadsheeet中移动工作表

con*_*rpw 6 google-sheets google-apps-script

我想使用apps脚本在spreadsheeet中移动工作表.怎么做?

最棒的生活!

Ser*_*sas 14

你看过文档了吗?

它确实显示了一个例子:

 // 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());
Run Code Online (Sandbox Code Playgroud)

  • [按字母顺序排列表格](http://www.youtube.com/watch?v=BTbAnQGFSQ0) (2认同)