我使用apps脚本创建了一个名为=matchlist
的自定义函数。该功能没有问题。我还创建了另一个名为refreshTBA
的函数,它清除某个单元格的内容(A2
)并用公式=matchlist(Setup!$b$2)
替换它。当我打开表单时运行此功能时,没有问题。但是,每当我离开页面并打开它时,单元格中的功能就是=matchlist(#REF)
。
这是refreshTBA函数的代码:
function refreshTBA() {
var ss = SpreadsheetApp.getActive().getSheetByName("MatchImport")
var cell = ss.getRange("A2")
cell.clearContent()
cell.setFormula('=matchlist(Setup!$b$2)')
var cell = ss.getRange("A300")
cell.clearContent()
cell.setValue('Refreshed')
}
感谢Google产品论坛的帮助,我解决了这个问题。
使用qazxsw poi参数放置公式时,不需要包含等号。如果我使用qazxsw poi那么我应该