Introduction

Welcome to MPXJ! This library provides a set of facilities to allow project information to be manipulated in Java and .Net. MPXJ supports a range of data formats: Microsoft Project Exchange (MPX), Microsoft Project (MPP,MPT), Microsoft Project Data Interchange (MSPDI XML), Microsoft Project Database (MPD), Planner (XML), Primavera (PM XML, XER, and database), Asta Powerproject (PP, MDB), and the Standard Data Exchange Format (SDEF).

The library is currently based around a set of structures modelled on the data described by the MPP file format. All manipulation of project data takes place using these data structures, which can be read from or written to the various supported file formats. The notes in the following paragraphs explain the facilities MPXJ offers for each file format.

  • MPX: The MPX file format can be read by all versions of Microsoft Project, and written by all versions up to Microsoft Project 98. MPXJ allows MPX files to be created, read and written. See http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q270139 for a definition of the file format.
  • MPP: The MPP file format is Microsoft's proprietary way of storing project data. MPXJ supports read only access to MPP files produced by Microsoft Project 98, Microsoft Project 2000, Microsoft Project 2002, Microsoft Project 2003, Microsoft Project 2007, and Microsoft Project 2010. MPP template files, with the suffix MPT are also supported.
  • MSPDI: The MSPDI file format is Microsoft's XML file format for storing project data. Versions of Microsoft Project from 2002 onwards can read and write MSPDI files. MPXJ allows MSPDI files to be created, read, and written. Documentation for the Project 2003 MSPDI file format can be downloaded from the MSDN web site as part of the Office 2003 XML Reference Schemas package. Documentation for the Project 2007 MSPDI file format can be downloaded from the MSDN web site as part of the Microsoft Project 2007 SDK. Documentation for the Project 2010 MSPDI file format can be downloaded from the MSDN web site as part of the Microsoft Project 2010 SDK.
  • MPD: The MPD file format is an Access database file format used to store one or more projects. The database schema used in these databases is also close to that used by Microsoft Project Server. MPXJ can read projects stored in an MPD file using a JDBC connection. It is possible that MPXJ could also read the same data from a Microsoft Project Server database using the same approach - but I haven't tried this!
  • PLANNER: Planner is an Open Source project management too which uses an XML file format to store project data. MPXJ read and write the Planner file format.
  • PRIMAVERA: Primavera is a high end project planning tool favoured by users with complex planning requirements. It can export project data in the form of an XER or PM XML files, both of which MPXJ can read. It is also possible for MPXJ to connect directly to the Primavera database via JDBC to read project data. MPXJ can also write PM XML files to allow data to be exported in a form which can be consumed by Primavera.
  • POWERPROJECT: Asta Powerproject is a planning tool used in a number of industries, particularly construction. Powerproject can save data to PP files or to MDB database files, and MPXJ can read both of these format.s
  • SDEF: SDEF is the Standard Data Exchange Format, as defined by the USACE (United States Army Corp of Engineers). SDEF is a fixed column format text file, used to import a project schedule up into the QCS (Quality Control System) software from USACE.

Java, .Net, PHP...

MPXJ is written and maintained in Java, however this is no barrier to using its functionality in .Net or PHP applications.

Thanks to the facilities provided by IKVM, the MPXJ distribution also contains a native .Net DLL version of MPXJ and its library dependencies. This allows MPXJ to be used from any .Net programming language (for example, C#, Visual Basic and so on), without having to be aware that the original code was written in Java. As part of the MPXJ release process the Java and .Net libraries are both exercised using the same set of regression tests to ensure that their behaviour is identical. Both the Java and .Net versions of the library are used in production commercial applications - so you can confident that the code will work for you!

One option for working with the functionality offered by MPXJ in your PHP application is to use a library like PHP/Java Bridge. PHP/Java Bridge can be used to expose the complete MPXJ API in PHP: you don't have to work in Java, C# or VB in order to work with Microsoft Project files.

Getting started with MPXJ in Java

The latest release of MPXJ can be downloaded from the project's SourceForge download page. The core MPXJ functionality is contained in the mpxj.jar file, which you will find in the root folder of the MPXJ distribution. The library is simple to use, and to illustrate this, a small number of sample files have been included in the utility source package of the distribution.

The MPP functionality depends on the POI library. In order to use the MPP functionality in MPXJ, the POI JAR file must be present on your classpath. A copy of this library can be found in the lib directory of the MPXJ distribution.

Getting started with MPXJ and .Net

The latest release of MPXJ can be downloaded from the project's SourceForge download page. The core MPXJ functionality is contained in the mpxj.dll file, which you will find in the lib.net folder of the MPXJ distribution. To use the library you will also need to ensure that the IKVM runtime DLLs are available to your application. The required IKVM libraries are provided in the lib.net folder of the MPXJ distribution.

The library is simple to use, and to illustrate this, a small number of sample files have been included in the utility source package of the distribution.

The MPP functionality depends on the POI library. In order to use the MPP functionality in MPXJ, the POI DLL file must be available to your application. A copy of this library can be found in the lib.net folder of the MPXJ distribution.

Maven

MPXJ is available in a Maven repository. An example Maven dependency for MPXJ is shown below:

<dependency>            
	<groupId>net.sourceforge</groupId>
	<artifactId>mpxj</artifactId>
	<version>4.3.0</version>
</dependency>
This facility has been provided by a user of MPXJ, so it is not something I can offer any advice or support for.

Keep in touch

I'm keen to hear from you about how you are using MPXJ, please drop me a note. If you use MPXJ as a part of an application that you redistribute, commercially or otherwise, drop me a line and I'll include a link to your website on the MPXJ page

You can help us

Please let me know what features you'd like to see added to MPXJ. In addition to feature requests, if you have MPP files that can't be read, or don't contain the data you expect, please let me know. The more of this feedback you can give me, the better I can make MPXJ!

We also very much welcome contributions of code to MPXJ. Please note however that by contributing code to MPXJ, you are assigning copyright for that code to the project. It is important for me to ensure that their is a single copyright owner for MPXJ to ensure that we can enforce the terms of MPXJ's license agreement where they are violated.

We can help you

Are you developing a commercial product that uses MPXJ? Do you want to integrate MPXJ into your application? Is MPXJ missing a feature critical to your business? If the answer to any of these questions is yes, I can help you! I offer commercial development services and consultancy for users of MPXJ. Please get in touch by mailing me to see how we can work together.

Licensing

MPXJ is distributed under the terms of the GNU LGPL, a copy of which can be found in the legal directory of the distribution. Please read this license carefully! It will cost you nothing to use MPXJ - but you must comply with the terms of the license. We have, and will continue to pursue any violations of the MPXJ LGPL that we are made aware of.

The functionality to read MPP files depends on the use of the POI library. The license for this library can be found in the legal directory of the distribution.

The functionality used to create .NET DLLs and the supporting libraries it requires depends on IKVM. The licenses for IKVM and its associated third party libraries can be found in the legal directory of the distribution.

A copy of the JUnit library is provided for your convenience to allow you to run the regression tests provided with MPXJ. The license for JUnit can be found in the legal directory of the distribution.

Acknowledgements

This product includes software provided by the Apache Software Foundation (http://www.apache.org)

This product includes software provided by IKVM.NET (http://www.ikvm.net)

This product includes software provided by the JUnit Project (http://www.junit.org)