Updating Google Calendar with MS Project Tasks
UPDATE
Have an updated version of this writeup at http://www.ashishpaliwal.com/blog/2011/07/updating-google-calendar-with-ms-project-revisited/
I am back, as promised. Please read my earlier post Processing Microsoft Project File in Java using MPXJ.
In this post we shall take an mpp and update the Google Calendar with the task details. The question is why would anyone do that?
Lets cook the story. A small team is working and the poor Project Manager share the Schedule with the team. The team is so busy coding that they forget to look at the dates, and the tasks they must be starting on. The poor Project Manager himself loose track unless he keeps MS Project Open on his desktop :-( A pretty common situation
Have faced this situation and decided to organize myself and this post is outcome of that. The driving force was "Out of sight, is out of mind". So my assumption was if the team has a visual of the task dates, the chances of task slippage shall reduce a lot.
In this post, have built upon the my previous post to create an MPP parsing function. Have tried to keep the code in simplest form, so that it can customized later to specific needs. Have created a sample Schedule for this activity and used it for the implementation. Here is how it looks.
The schdule is simple, some date, and tasks with dependencies. The concept shall work for any number of tasks.
Following are the steps that we need to perform:
- Parse the mpp file
- Create a Calendar Service (Lets assume that the Calendar is already there, though it is possible to programmatically create the same)
- Get All tasks from MPP, and create Calendar Entries in Google Calendar
The implementation is fairly simple. We have 3 functions:
- translateTaskToCalendarEventEntry() - Converts an Task into CalendarEventEntry, which can be added to Google Calendar
- updateCalendar() - Takes input of all the Tasks from MPP, translates into CalendarEventEntry (using function translateTaskToCalendarEventEntry) and update the Calendar
- updateGoogleCalendarWithMPP() - Parses the MPP using the util function from my previous post, and calls the API above to update the Calendar.
Google Calendar API usage is described in details on Google's pages, hence won't discuss here.
To use it for yourself, replace User Name and Password at line#70, with your User Credentials. Repace the URL at Line# 71 to point to your calendar.
After running the program, this is how my Calendar looked like
A simple way to keep track of Tasks.



Hi, that’s great!
how do I get the full code?
I mean a file with everything I need to use the wonderful thing you did? except from libs, off course.
Thanks
Most of the code is in the post. Please feel free to create your own file
Let me know, if you need any more inputs.
Hello. It’s a very interesting thing what you did here… A little question though… How do I update a shared google calendar if I am the poor project manager, who has several employees?
Thanx a lot for any help you can give me.
Shouldn’t be any different. Just get the correct Calendar URL
Hi, I’m a non programmer
but would like to use this code
could someone by an absolute star and create an executable that I can run ?
so it takes the mpp file and your google calender login and which calender you want to sync with
I went everywhere looking for a program that I could just put a Microsoft Project file in and get anything else out so that I could try to get it to my Google Calendar easily.
And after failing miserably, I settled on your code here. It wasn’t good enough for me though, so I spent two days writing this tool that does just a little bit better for me.
If anyone wants the fruits of our labor, there’s an app for that now.
Just head over here if you want to download it: http://daball.github.com/Microsoft-Project-to-Google-Calendar/
Thanks for figuring it out!
David Ball
Thank you Dave!