我想使用应用程序脚本在电子表格中移动工作表。
怎么做?
最好的直播!
你看过吗文档 https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet?hl=en#moveActiveSheet%28Integer%29 ?
它也显示了一个示例:
// 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());
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)