<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Thread.currentThread().join() &#187; Apache POI</title>
	<atom:link href="http://www.ashishpaliwal.com/blog/tag/apache-poi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ashishpaliwal.com/blog</link>
	<description>From Programmer, For Programmers</description>
	<lastBuildDate>Tue, 23 Aug 2011 03:53:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Updating Google Calendar with MS Project Tasks</title>
		<link>http://www.ashishpaliwal.com/blog/2008/10/updating-google-calendar-with-ms-project-tasks/</link>
		<comments>http://www.ashishpaliwal.com/blog/2008/10/updating-google-calendar-with-ms-project-tasks/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 13:52:19 +0000</pubDate>
		<dc:creator>ashish</dc:creator>
				<category><![CDATA[Application Programming]]></category>
		<category><![CDATA[Apache POI]]></category>
		<category><![CDATA[GData API]]></category>
		<category><![CDATA[Google Calendar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Microsoft Project]]></category>
		<category><![CDATA[MPXJ]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Task Tracking]]></category>

		<guid isPermaLink="false">http://www.ashishpaliwal.com/blog/?p=67</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE</p>
<p>Have an updated version of this writeup at <a href="http://www.ashishpaliwal.com/blog/2011/07/updating-google-calendar-with-ms-project-revisited/">http://www.ashishpaliwal.com/blog/2011/07/updating-google-calendar-with-ms-project-revisited/</a></p>
<hr>
<p>I am back, as promised. Please read my earlier post <a rel="bookmark" href="http://www.ashishpaliwal.com/blog/?p=58" target="_blank">Processing Microsoft Project File in Java using MPXJ</a>.</p>
<p>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? </p>
<p>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 <img src='http://www.ashishpaliwal.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p>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. </p>
<p>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.</p>
<p> </p>
<div id="attachment_68" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/mpp.png"><img class="size-medium wp-image-68" title="mpp" src="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/mpp-300x39.png" alt="Google Calendar updater Project Schedule" width="300" height="39" /></a><p class="wp-caption-text">Google Calendar updater Project Schedule</p></div>
<p>The schdule is simple, some date, and tasks with dependencies. The concept shall work for any number of tasks.</p>
<p>Following are the steps that we need to perform:</p>
<ol>
<li>Parse the mpp file</li>
<li>Create a Calendar Service (Lets assume that the Calendar is already there, though it is possible to <span><span>programmatically</span></span> create the same)</li>
<li>Get All tasks from MPP, and create Calendar Entries in Google Calendar</li>
</ol>
<div><strong>The Code</strong></div>
<div>
<div id="attachment_69" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/gcalupdatecode.png"><img class="size-full wp-image-69" title="Google Calendar Entry Creation Code" src="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/gcalupdatecode.png" alt="Google Calendar Entry Creation Code" width="500" height="480" /></a><p class="wp-caption-text">Google Calendar Entry Creation Code</p></div>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-6961884887741817";
/* 468x60ImageOnly */
google_ad_slot = "0221726572";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>The implementation is fairly simple. We have 3 functions:</p>
<ul>
<li>translateTaskToCalendarEventEntry() - Converts an Task into CalendarEventEntry, which can be added to Google Calendar</li>
<li>updateCalendar() - Takes input of all the Tasks from MPP, translates into CalendarEventEntry (using function translateTaskToCalendarEventEntry) and update the Calendar</li>
<li>updateGoogleCalendarWithMPP() - Parses the MPP using the util function from my previous post, and calls the API above to update the Calendar.</li>
</ul>
<p>Google Calendar API usage is described in details on Google's pages, hence won't discuss here.<br />
To use it for yourself, replace User Name and Password at line#70, with your User <span><span>Credentials</span></span>. Repace the URL at Line# 71 to point to your calendar.<br />
After running the program, this is how my Calendar looked like </p>
<dl id="attachment_72" class="wp-caption aligncenter" style="width: 510px;">
<dt class="wp-caption-dt"><a href="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/gcalview.png"><img class="size-full wp-image-72" title="Google Calendar View" src="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/gcalview.png" alt="Google Calendar View" width="500" height="232" /></a></dt>
<dd class="wp-caption-dd">Google Calendar View</dd>
</dl>
<p>A simple way to keep track of Tasks.<br />
 </p></div>
<p><script type="text/javascript"><!--
google_ad_client = "ca-pub-6961884887741817";
/* 468x60ImageOnly */
google_ad_slot = "0221726572";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ashishpaliwal.com/blog/2008/10/updating-google-calendar-with-ms-project-tasks/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Processing Microsoft Project File in Java using MPXJ</title>
		<link>http://www.ashishpaliwal.com/blog/2008/10/processing-microsoft-project-file-in-java-using-mpxj/</link>
		<comments>http://www.ashishpaliwal.com/blog/2008/10/processing-microsoft-project-file-in-java-using-mpxj/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 08:46:32 +0000</pubDate>
		<dc:creator>ashish</dc:creator>
				<category><![CDATA[Application Programming]]></category>
		<category><![CDATA[Apache POI]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[MPXJ]]></category>

		<guid isPermaLink="false">http://www.ashishpaliwal.com/blog/?p=58</guid>
		<description><![CDATA[Many a time, I wished I had a utility that would read my projects mpp File and automatically alerted me about my tasks. Had created such a utilitly and this post desribes the process of reading MS Project Files in Java using MPXJ and Apache POI library. MPXJ - MPXJ is the java library used [...]]]></description>
			<content:encoded><![CDATA[<p>Many a time, I wished I had a utility that would read my projects mpp File and automatically alerted me about my tasks. Had created such a utilitly and this post desribes the process of reading MS Project Files in Java using MPXJ and Apache POI library.</p>
<p><strong><em>MPXJ</em></strong> - MPXJ is the java library used for parsing MS Project files. The lib depends upon Apache POI package for providing the functionality. MPXJ supports all the three formats for MS Project. The details can be found at the Home Page for MPXJ provided in references section</p>
<p>Let's start implementing. The code to read the File is fairly simple.</p>
<div id="attachment_60" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/codesnippets.png"><img class="size-medium wp-image-60" title="codesnippets" src="http://www.ashishpaliwal.com/blog/wp-content/uploads/2008/10/codesnippets-300x116.png" alt="Reading MS Project File in Java (Using MPXJ)" width="300" height="116" /></a><p class="wp-caption-text">Reading MS Project File in Java (Using MPXJ)</p></div>
<p> To read an MS Project file, we use projectReaderUtility class to get the instance of a ProjectReader, based on the extension. ProjectReader is the interface implemented by the classes that can read an MS Project file in mpxj library. Once we get the instance of ProjectReader, we need to invoke read API, passing the file name to be read. The API returns an instance of ProjectFile, containing all the details in the MS Project File. </p>
<p><strong><em>More about ProjectFile</em></strong> - ProjectFile is the class in mpxj, which contains all the information about an MS Project file. It has API's to access all Task details, as well other API's to extract and manipulate other metadata.</p>
<p>Is that it? The basic objective of reading is done. Now we can use the provided API to iterate and create applications to suite our needs. For example, to list all the tasks, use getAllTasks(), it returns a List of Tasks. Custom logic can be applied to manipulate this list as desired, like filtering the tasks based on resources or date.</p>
<p>What's next?</p>
<p>I am working on the prototype to read the MS Project File and update the Google Calendar with Task details, based on Start Date.</p>
<p>References</p>
<ul>
<li><a href="http://mpxj.sourceforge.net/index.html">http://mpxj.sourceforge.net/index.html</a></li>
<li><a href="http://poi.apache.org/index.html">http://poi.apache.org/index.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ashishpaliwal.com/blog/2008/10/processing-microsoft-project-file-in-java-using-mpxj/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

