Hi,
Please follow the step:
1.Move the “ProjectB.mpp” and “ProjectA.mpp” in attachment to “c:\aspose” .
2.Run the code as below :
public static void main(String[] args) throws ParseException {
FileInputStream fstream = null;
try {
// Create a stream object containing the license file
fstream = new FileInputStream(“Aspose.Tasks.lic”);
// Instantiate the License class
License license = new License();
// Set the license through the stream object
license.setLicense(fstream);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
fstream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
Project asProject = new Project(“c:\aspose\ProjectB.mpp”);
// Save the Project
asProject.save(“c:\aspose\output_external_task.mpp”, SaveFileFormat.MPP);
System.out.println(“ok”);
}
3.Open the “output_external_task.mpp”.
I have external task in “ProjectB.mpp”, why the external task convert to local task after save as to “output_external_task.mpp”? Do you have any way that I can keep the external task?
Best Regards!
zhencheng.guo