sheet2cal 脚本在移动到日历时返回 NaN

问题描述 投票:0回答:1

使用新的应用程序脚本,该脚本是根据基于sheet2cal的工作应用程序脚本构建的。有效,但当结果转移到日历时不断得到 NaN。

if (eventID != complete) {
  var currentCell = sheet.getRange(startRow + i, numColumns);
  calendar.createEvent(Purpose + '-' + Visiting, Start, End, { description: +Name + ' | ' + Phone + ' | ' + Email + ' | ' + Details + ' | ' + Insurance });
  currentCell.setValue(complete);
}

日历结果:

Contractor-Ron Layton
Saturday, September 30⋅1:00 – 6:00pm
**NaN** | 9042701111 | [email protected] | Kia Soul, FL-SUX000, Sales pitch |
google-apps-script google-sheets google-calendar-api
1个回答
0
投票

当我看到你的展示脚本时,似乎是

{ description: +Name + ' | ' + Phone + ' | ' + Email + ' | ' + Details + ' | ' + Insurance }
。在这种情况下,我认为您当前问题的原因是由于
+
+Name
。因此,请按如下方式删除此
+

来自:

calendar.createEvent(Purpose + '-' + Visiting, Start, End, { description: +Name + ' | ' + Phone + ' | ' + Email + ' | ' + Details + ' | ' + Insurance });

致:

calendar.createEvent(Purpose + '-' + Visiting, Start, End, { description: Name + ' | ' + Phone + ' | ' + Email + ' | ' + Details + ' | ' + Insurance });
© www.soinside.com 2019 - 2024. All rights reserved.