我正在使用一个表格来引用一个单独的电子表格,从Google表单中收集响应。我希望在填充后将行记录为值,并在尚未包含值的行中维护公式。但是,当我运行该脚本时,什么也没有发生。这看起来应该很简单。
function setFormulas() {
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("English Form Responses");
Logger.log(ss.getRange(2, 1, ss.getLastRow(), 16).getValues());
}发布于 2017-08-03 21:41:18
Range.getValues();函数不返回公式,只返回值。使用Range.getFormulas();获取/记录某个范围内的公式。
https://developers.google.com/apps-script/reference/spreadsheet/range#getFormulas()
https://stackoverflow.com/questions/45481987
复制相似问题