google-sheets-api - Appscript setformula 解析错误。但似乎工作
问题描述
我正在尝试使用此代码在谷歌电子表格单元格中设置公式
function SetFormuleSettimana(row) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var Settimane = ss.getSheetByName("Settimane");
var cell = Settimane.getRange("I" + row);
cell.setFormulaR1C1('ArrayFormula(Indice(Gruppi!A:G;Confronta(1;(G' + row + '=Gruppi!A:A)*(H' + row + '=Gruppi!B:B);0);5))');
}
单元格似乎正确填充了公式=ArrayFormula(Indice(Gruppi!A:G;Confronta(1;(G2=Gruppi!A:A)*(H2=Gruppi!B:B);0);5))
但我得到一个“解析错误”,分析电子表格中的公式帮助给出正确的值。
解决方案
使用非英语语言的 Apps 脚本设置公式时出现问题。
要以编程方式设置公式,同时您需要使用公式的相应英文名称。
推荐阅读
- graphql - 使用 Hot Chocolate 时忽略输入对象类型中的只读属性
- python - 如何从列表中删除 0.1%?
- c# - 从天网序列化 protobuf 和在 C# 中序列化给出不同的字节
- kotlin - Kotlin:使用不可序列化的对象反序列化映射
- excel - 重新排列用户窗体控件的顺序
- python - yFinance 的 JSON 解码错误 [JSONDecodeError:预期值:第 1 行第 1 列(字符 0)]
- python - Django Rest 注册(第 3 方包)要求签名以验证注册.. 什么签名?
- node.js - 我希望不和谐机器人仅在该人将命令放入服务器而不是机器人的 dm 时发送直接消息
- git - 如何在git中将文件标记为非二进制文件?
- python - 如何以 django 清脆的形式删除“密码条件文本”