.setFormula()和接收到的错误丢失)参数列表 [英] .setFormula() and received error missing ) argument list
问题描述
我有.setFormula()
并停留在此位置.我认为问题是逗号(&","
).在发布此问题之前,我已经研究了几个在线论坛,但是没有运气.也许有人在这里可以帮助我.我确实知道有关使用""
和''
的规则,这就是为什么我尝试了多个公式的原因,但是仍然收到错误消息:
I have .setFormula()
and stuck on this. I think the problem is the comma (&","
). I have researched several online forum before posting this question but no luck; perhaps someone here could help me out. I do know the rules about using the ""
and ''
that's why I have tried several formulas but still, I receive the error message:
在参数列表后缺少)".
"Missing ) after argument list".
感谢您的时间和帮助!
Your time and help is appreciated!
原始公式:
=arrayformula(concatenate(filter('Sheet1'!E2:E,'Sheet1'!E2:E<>"")&", "))
代码:
me.getRange('B8').setFormula("=arrayformula(concatenate(filter('Sheet1'!E2:E,'Sheet1'!E2:E<>"") & ", "))");
我尝试过但失败的公式:
Formulas I have tried but failed:
"=arrayformula(concatenate(filter('Sheet1'!E2:E,'Sheet1'!E2:E<>'') & ', '))");
'=arrayformula(concatenate(filter('Sheet1'!E2:E,'Sheet1'!E2:E<>'') & ', '))');
"=arrayformula(concatenate(filter('Sheet1'!E2:E,'Sheet1'!E2:E<>'') & ", "))");
'=arrayformula(concatenate(filter("Sheet1"!E2:E,"Sheet1"!E2:E<>"") & ", "))');
推荐答案
您不需要在Sheet1
周围加上单引号'
.
You dont need single quotes '
around Sheet1
.
尝试
me.getRange('B8')
.setFormula('=arrayformula(concatenate(filter(Sheet1!E2:E,Sheet1!E2:E<>"") & ", "))"');
如果您仍然需要它,则需要像这样的\'
那样用游隙将其转义:
If you still need it, you need to escape it with backlashes like this \'
:
me.getRange('B8')
.setFormula('=arrayformula(concatenate(filter(\'Sheet1\'!E2:E,\'Sheet1\'!E2:E<>"") & ", "))"');
参考:
这篇关于.setFormula()和接收到的错误丢失)参数列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!