Convert a Google calendar in CSV

If you use my Free ICS to CSV converter web service to convert your calendar(s) as a table to be able to import into Excel, Pages, Numbers, or even to Google Calendar you might already know that you can select one or more ics files at once, or enter a url of an online calendar.

Important: My converter converts only files ending in .ics

I was checking the other day what happens for users of Google calendar when they export their calendars. Google exports even if you select just one calendar a zip containing the ics.

So, the zip file cannot be converted and the converter will throw an error.

To use those exported files from Google Calendar, just take the individual ICS files out of the ZIP file and select for the converter.

🖖

Safari 14.0.1 & Choose File(s)

After updating my Safari to the latest 14.0.1 version on my macOS 10.14.6 the file selector which would usually come when one clicks onto ‘Choose File’ button, stopped working.

Interesting enough when one drags and drops a file from a Finder window onto the Choose File button, this file will then be selected, but… WTF? Safari 14.0.1 works fine on macOS 10.15.x or on iOS.

Anyhow while I am hoping for Apple to solve this in a future update for macOS 10.14.6 users, I decided to implement a warning on the page of my Free ICS to CSV converter showing only when one opens the page using Safari 14.0.1

So I coded something like the following in php…

if (get_browser_name($_SERVER['HTTP_USER_AGENT']) == 'Safari') {
if (get_browser_plattform($_SERVER['HTTP_USER_AGENT'])) {
echo "Note for Safari 14.0.1 on macOS 10.14.x: 
      Please use another browser…";
}

Whereby… my php functions… get_browser_name($user_agent) and get_browser_plattform($user_agent) calculate as follows:

function get_browser_name($user_agent) {
if (strpos($user_agent, 'Opera') || strpos($user_agent, 'OPR/'))
 return 'Opera';
elseif (strpos($user_agent, 'Edge')) return 'Edge';
elseif (strpos($user_agent, 'Chrome')) return 'Chrome';
elseif (strpos($user_agent, 'Safari')) return 'Safari';
elseif (strpos($user_agent, 'Firefox')) return 'Firefox';
elseif (strpos($user_agent, 'MSIE') || 
  strpos($user_agent, 'Trident/7')) 
  return 'Internet Explorer';
  return 'Other';
}

and…

function get_browser_plattform($user_agent) {
    if ( strpos($user_agent, '14.0.1') && 
        strpos($user_agent, 'Mac OS X 10_14'))  { 
	return true; 
    } else { 
    	return false;
    }
}
 

I thought first I should check for iPhone or iPad in the $user_agent, this however has still the issue I noticed sometime ago here.

So… I am simply checking for the Safari and the macOS versions, because I actually know through tests that the function is fine on newer or older systems, and I otherwise do not want to make things more complicated for users of other browsers.

Well, I am fine with that solution for the time being. 🖖

PS: Is it me or it is so much difficult currently pasting code text in the editor of WordPress and having it formatted in a decent way?

How to import a csv file in Google Calendar

If using my free ICS to CSV converter service, which reads one or multiple ics calendar file(s), converts them in comma separated files and offers such CSV files for download, you might also want to know how to open the downloaded csv file in EXCEL or Google Calendar.

EXCEL opens it via File > Import thus…

For Google Calendar, you’ll need to enable a specific option while converting the ics file(s) and modify the thus created csv to contain the Headers Google requires.

Converting your ics file to an csv file, to be imported in Google Calendar…

  • Enable the option ‘Split date and time’ before converting.
  • Open the csv file in a text editor.
  • Locate the header row.
  • Change the headers as Headers Google requires that is:
    • Rename SUMMARY to Subject
    • Rename DTSTART-DATE to Start Date
    • Rename START-TIME to Start Time
    • Rename DTEND-DATE to End Date
    • Rename END-TIME to End Time
    • Rename DESCRIPTION to Description
    • Rename LOCATION to Location
  • NOTE: If having converted more than one file at once, you’ll need to make sure you have only one header row and remove all further header rows other than this on row #1.
  • Save your changed csv file
  • Import into our Google Calendar thus
  • Imported n out of n events
  • Check the resulting events in your calendar