【发布时间】:2021-09-26 00:04:16
【问题描述】:
getMonth 不是 Google 表格代码中的函数:
... Logger.log(ss.getSheetByName("Rendimentos").getRange(aportes-cont,3).getValue().getMonth());
while (ss.getSheetByName("Rendimentos").getRange(aportes-cont,3).getValue().getMonth()===numMes){ ... }
Logger.log 行完美运行。它显示所需的月份数。但是第二行显示消息错误:getMonth() is not a function。
同样的代码在 Logger.log 中运行是没有意义的,但会卡在 while 循环中。
我不知道该怎么办。
【问题讨论】:
-
“getMonth() 不是函数” 不是错误消息。完整的错误信息是什么?到目前为止你做了什么调试?了解how to debug small programs。
-
请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。