Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active February 24, 2022 12:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/a58d91fc3940675de3c3895f0f1c1537 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/a58d91fc3940675de3c3895f0f1c1537 to your computer and use it in GitHub Desktop.
Java Convert XML to MPP or Import Microsoft Project Data File as XML Programmatically
// Load input MPP file using Project class
Project project = new Project("template.mpp");
// Save output XML file with SaveFileFormat enumeration
project.save("output.xml", SaveFileFormat.XML);
// Load input XML file
Project xmlProject = new Project("Input.xml");
// Load template MPP file
Project mppProject = new Project("Blank Project 2010.mpp");
// Call copyTo() method of Project class
xmlProject.copyTo(mppProject);
// Save output MPP (Microsoft Project File)
mppProject.save("ConvertedXmlToMpp.mpp", SaveFileFormat.MPP);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment