Before the weekend, we released the 2.1.3 version containing a few new goodies. For Ext Scheduler, there is a new EventTools plugin allowing for easy interaction with the rendered events. See it in action in this video:


For Ext Gantt, we added a new PHP + MySQL sample showing how to make a simple application with full CRUD implemented. We also updated the popular advanced example to enable a color picker column, and last but not least we also included a new sample showing how to import data from MS Project. Let’s take a peek under the hood of this new example.

Importing from MS Project

This has been a popular feature request ever since the Ext Gantt was created and we are very happy to be able to share this demo with you. With the help of the MPXJ library we built a Java based application for extracting data from .mpp files. The finished project is a standalone JAR package, and the only dependency is Java JDK 1.5+. Using this package, we get the ability to easily extract and import Tasks, Resources, Assignments and Dependencies from MS Project binary files. There are two different ways of importing data using our JAR package.

Command Line

The first option is to generate a file with JSON formatted data, which can be then loaded manually into the Gantt chart. To create a JSON file, we need to run this command in terminal/command line:

java -jar gantt_msp.jar msp_file.mpp target_location.json

Below is the sample structure of the generated json file :


Importing data in-browser

The second, more advanced use case allows users to upload an MSP project file directly to the Gantt panel from their browser. In order to do this we have to add a file upload form which will send the .mpp file to a simple PHP script executing the JAR file. Below is a simple form that can be added to the Gantt panel toolbar:

The interesting part here is the ‘Load’ button. After clicking it, our form is submitted to the server. When we receive the server response, each store used by the Gantt panel is loaded with the appropriate JSON data.

The last part of this example is the PHP upload script. It simply saves the received file in a temporary folder, and after that executes a command similar to the one presented previously using php’s shell_exec method. The JSON generated from the .mpp file is then returned with the response :

Note: On Windows systems, the path where the file will be saved needs to be absolute and use backslashes:

Remember, that in order to have this code running on your server, you need to provide absolute path to MSPBryntumImport.jar and the path to your temporary destination for uploaded files to be saved. You also need to make sure that the server user has privileges for both reading/creating files as well as running the JDK.


Summing it up…

Now it’s time for you to try out the online example, or download the 2.1.3 version from the Customer Zone and hopefully you will see all your Microsoft Project data visualized right in the browser. Feel free to leave a comment if you have find this useful or if you have any ideas on how to improve the this example.




MPXJ Library
Java Download Page

  1. Sangeeta 03/20/2013, 11:26 am Reply

    This is really helpful for me and it meets my requirement too. Can I use the “.JAR” file in my site? Is this free or paid? If paid, then please let me know the prices for this.

  2. after image band 09/03/2013, 12:39 am Reply

    Greetings! Very helpful advice in this particular post!
    It is the little changes that produce the most important changes.
    Thanks a lot for sharing!

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>