How To: Work with Powerproject files

MPXJ can read two file formats supported by Powerproject: PP and MDB. The example below shows how a PP file can be read.

import net.sf.mpxj.ProjectFile;
import net.sf.mpxj.asta.AstaFileReader;

...

AstaFileReader reader = new AstaFileReader();
ProjectFile projectFile = reader.read(inputFile);

Similar code can also be used to read an MDB file generated by Powerproject, as shown below.

import net.sf.mpxj.ProjectFile;
import net.sf.mpxj.asta.AstaFileReader;

...

AstaDatabaseReader reader = new AstaDatabaseReader();
ProjectFile projectFile = reader.read(inputFile);