Hi,
We are evaluating the Aspose.Tasks library and I ran into this problem using the example provide by Aspose.
For this example (see Capture1.JPG)
\src\programmersguide\workingwithprojects\writemppprojectsummary\java\WriteMPPProjectSummary.java,
I click on “Run Example”, the new MPPAspose.xml is created/updated in src\programmersguide\workingwithprojects\writemppprojectsummary\data.
I open the MS Project 2010 to load the XML file, but got “The start of Task 10 is before Project Start” error. I clicked OK, the tasks are loaded. however, the dates for all tasks are messed up. (see Capture2.JPG)
Do you have a working example where XML tasks can be loaded into MS Project successfully?
Thanks!
Hi Ying,
Project project = new Project(“project.mpp”);
//Set some summary information about the project
project.setAuthor(“Muhammad Sabir”);
project.setLastAuthor(“Sergey Polshkov”);
project.setRevision(15);
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(2014,2,15,0,0,0);
project.setCreationDate(cal.getTime());
cal.set(2014,3,15,0,0,0);
project.setKeywords(“MPP Aspose”);
cal.set(2014, 3, 16,0,0,0);
project.setLastPrinted(cal.getTime());
project.setSubject(“Aspose Subject”);
project.setTemplate(“Aspose Template”);
project.setComments(“Aspose Comments”);
//Save the Project back in MPP format
project.save(“MPPAspose.xml”, SaveFileFormat.XML);
//Display result of conversion.
System.out.println(“Process completed Successfully”);