【发布时间】:2020-02-21 03:48:33
【问题描述】:
一直在使用CalendarApp 帮助将来自不同帐户的多个 Google 日历汇总到一个格式良好的电子表格中。但是,我们不仅希望将这些日历合并到系统中,而且在从我们订阅的导入日历中检索数据时遇到了麻烦。
这个日历来自 Trello(使用 power-up 根据到期日创建日历),它提供了一个 URL 供我们在 Google 上订阅。当我尝试使用相同的CalendarApp.getCalendarById(calendarId) 时,它似乎无法访问事件数据并返回null。
作为参考,这里是日历 ID:mp9si8iqi6uop4a20pr0r1v000dc9pcu@import.calendar.google.com。格式与以 @group.calendar.google.com 结尾的 Google 日历略有不同。
我们是否能够从这些导入的日历中访问日历信息?我也尝试了.getCalendarsByName(calendarName),但没有成功,但还有其他方法可以查看这些数据并将其包含在我们的日历电子表格中吗?任何帮助表示赞赏!
编辑(按要求)
如果我不清楚,我尝试了以下方法:
calendarId = "mp9si8iqi6uop4a20pr0r1v000dc9pcu@import.calendar.google.com";
CalendarApp.getCalendarById(calendarId);
//and
calendarName = "Collab, Events & Special Buy";
CalendarApp.getCalendarsByName(calendarName);
只有这个由 Trello 管理的日历存在问题
【问题讨论】:
-
请添加您目前尝试过的代码
-
嘿@ChucksKegscom 我刚刚发布了一个答案。如果您有任何问题,请告诉我。干杯
-
谢谢@carlesgg97!这次我们找到了日历!
标签: google-apps-script google-sheets calendar trello