Blog / How to Get Calendar Events into Google Sheets
· 4 min read

How to Get Calendar Events into Google Sheets

Three ways to pull calendar events into Google Sheets — a one-off CSV import, an Apps Script that refreshes automatically, and IMPORTDATA for public feeds.

Google Sheets is where most calendar analysis actually happens — hours billed, room utilisation, how much of the week disappeared into meetings. There are three ways to get events in, and they differ mainly in whether the data needs to stay fresh.

Option 1: One-Off CSV Import

Best when you need a snapshot: last quarter's hours, or a schedule to hand to someone.

  1. Export the calendar as .ics, or download the file you were sent.
  2. Open it in ICS Viewer and export to CSV.
  3. In Sheets: File → Import → Upload, and choose Replace current sheet.

Set File → Settings → Locale before importing. Sheets parses dates according to the spreadsheet locale, so a US locale reading European dates will silently transpose day and month for every event before the 13th.

Option 2: Apps Script (Refreshes Itself)

Best when you want a sheet that stays current — a rolling timesheet or a live dashboard. Apps Script has direct access to Google Calendar, so no export step is needed at all:

function syncCalendar() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var start = new Date();
  var end = new Date();
  end.setMonth(end.getMonth() + 1);

  var events = CalendarApp.getDefaultCalendar()
    .getEvents(start, end);

  sheet.clear();
  sheet.appendRow(['Title', 'Start', 'End', 'Hours', 'Location']);

  events.forEach(function (e) {
    var hours = (e.getEndTime() - e.getStartTime()) / 3600000;
    sheet.appendRow([
      e.getTitle(),
      e.getStartTime(),
      e.getEndTime(),
      e.isAllDayEvent() ? '' : hours,
      e.getLocation()
    ]);
  });
}

Open Extensions → Apps Script, paste this, then add a time-driven trigger to run it daily. Note that getEvents returns recurring events already expanded into individual occurrences, which is what you want for hour totals, and that all-day events are given a blank duration rather than 24 hours.

Option 3: IMPORTDATA on a Public Feed

If the calendar publishes a public iCal URL, IMPORTDATA will pull the raw file straight into the sheet:

=IMPORTDATA("https://example.com/calendar.ics")

Be clear about what this gives you: raw iCalendar lines in a single column, not a table. You then need QUERY or REGEXEXTRACT gymnastics to pull out SUMMARY and DTSTART values, and it will not survive folded lines or expand recurring events. It is genuinely useful for a simple, flat feed — an event listing or a public timetable — and a poor fit for anything complex.

Which to Choose

  • Snapshot for analysis → CSV import.
  • Living dashboard on your own Google Calendar → Apps Script.
  • Simple third-party public feed → IMPORTDATA.
  • A feed you do not control and cannot trust → open it in ICS Viewer first to see what it actually contains before wiring anything to it.

Want to preview an ICS file right now?

Open ICS Viewer →