问题描述
我有 .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:
参数列表后缺少)".
感谢您的时间和帮助!
原始公式:
=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() 并收到错误丢失 ) 参数列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!