変数 = CalendarApp.createCalendar( 名前 );
変数 = Calendar.createEvent( タイトル, 開始日時, 終了日時 );
変数 = Calendar.createEvent( タイトル, 開始日時, 終了日時, オプション );
変数 = Calendar.createAllDayEvent( タイトル, 日にち );
変数 = Calendar.createAllDayEvent( タイトル, 日にち, オプション );
《Calendar》.deleteCalendar();
《CalendarEvent》.deleteEvent();
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
function createCalEvent(){ var sheet = SpreadsheetApp.getActiveSheet(); var str = Browser.inputBox("イベントのテキスト:"); var calName = "MySampleCal"; var cals = CalendarApp.getCalendarsByName(calName); var cal = null; if (cals.length == 0){ cal = CalendarApp.createCalendar(calName); } else { cal = cals[0]; } var d1 = new Date(); var d2 = new Date(); d2.setHours(d2.getHours() + 1); cal.createEvent(str, d1, d2); }
<< 前へ | 次へ >> |