【问题标题】:How to move sheet within Google Spreadsheeet using apps script [duplicate]如何使用应用程序脚本在 Google 电子表格中移动工作表 [重复]
【发布时间】:2013-05-06 15:12:14
【问题描述】:

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

现场最佳!

【问题讨论】:

  • @Rubén 这个问题有更相关和更纯粹的标题。不是吗?
  • 也许吧,但主体是问题中最重要的部分。

标签: google-apps-script google-sheets


【解决方案1】:

你看过the documentation吗?

它也显示了一个例子:

 // 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());

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-02-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多