首页 > 解决方案 > 工作表和日历之间的 Apps 脚本问题

问题描述

我正在尝试从一列日期和一列数据中创建事件。

我正在挂断此错误消息:

找不到方法 createAllDayEventSeries(string,string,string)。(第 14 行,文件“代码”)

我的代码附在屏幕截图中,并且在大多数情况下,我都遵循了 Gsuite 在线教程,尽管我使用了全天事件代码,因为我的工作表中没有时间。

关于我哪里出错的任何线索?

我的代码截图

标签: google-apps-scriptgoogle-sheetsgoogle-calendar-api

解决方案


问题是参数类型错误。根据 https://developers.google.com/apps-script/reference/calendar/calendar#createalldayeventseriestitle,-startdate,-recurrence

参数

Name        Type                Description
title       String              the title of the events in the series
startDate   Date                the date of the first event in the series (only the day is used; the time is ignored)  
recurrence  EventRecurrence     the recurrence settings of the event series

但是您的脚本将所有参数作为字符串传递

有关的


推荐阅读