我的脚本在谷歌电子表格文档中这是我的脚本:
ss = SpreadsheetApp.getActiveSpreadsheet();
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [ {name: "10 Rows", functionName: "TenRows"},
{name: "20 Rows", functionName: "TwentyRows"},
{name: "30 Rows", functionName: "ThirtyRows"},
{name: "40 Rows", functionName: "FortyRows"},
{name: "50 Rows", functionName: "FiftyRows"}]
ss.addMenu("Insert Rows", menuEntries);
}
function TenRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,10);
}
function TwentyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,20);
}
function ThirtyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,30);
}
function FortyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,40);
}
function FiftyRows() {
SpreadsheetApp.getActiveSheet().insertRowsBefore(2,50);
}
在我的电子表格的 C 列中,每行都有一串数字。
像这样
C
7317
7316
7315
7314
7313
当我运行脚本插入多行时,我怎样才能让它自动继续这个升序并将其输入到 C 列?
谢谢