【发布时间】:2019-10-11 13:52:03
【问题描述】:
我希望能够单击 Google 表格中的按钮并将 +1 添加到特定单元格。
我有这个脚本:
function AddOne(inputCell) {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange(inputCell).activate();
spreadsheet.getCurrentCell().setValue(spreadsheet.getCurrentCell().getValue() + 1);
};
在按钮上,我分配了脚本
AddOne('C6')
当我点击按钮时,出现错误Script function AddOne('C6') could not be found。
你能帮我解决这个问题吗?
提前致谢。
【问题讨论】:
-
你想添加的单元格是always C6吗?
-
不,我想使用几个按钮,但只需要一个脚本。
标签: google-apps-script google-sheets-formula