Free Support Forum - aspose.com

MPP file

Hi. Did yor JAVA API offers a create mpp file?
This message was posted using Banckle Live Chat 2 Forum

Hi Mateusz,


Thank you for contacting Aspose support team.

Aspose.Tasks provides rich features to create Project files and save in variety of formats including MPP format. MPP file can be created using a blank template project file as shown in the following sample code:

<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:gray”>//Create a project
instance

Project
newProject =
<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>new
Project(<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:green”>“Blank2010.mpp”
);



<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:
“Times New Roman”;color:gray”>//Create a file stream

FileOutputStream
projectStream =
<span style=“font-size:9.0pt;font-family:“Courier New”;
mso-fareast-font-family:“Times New Roman”;color:navy”>null
;

<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:navy”>try

{

projectStream =
<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:navy”>new
FileOutputStream(<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:green”>“Output.mpp”
);

newProject.save(projectStream, SaveFileFormat.
<span style=“font-size:9.0pt;font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;
color:#660E7A”>MPP
);

projectStream.close();

}

<span style=“font-size:9.0pt;
font-family:“Courier New”;mso-fareast-font-family:“Times New Roman”;color:navy”>catch
(IOException e)

{

e.printStackTrace();

}<o:p></o:p>


You may please have a look at the following topics for more details about working with projects and tasks. Please feel free to write us back for any other query in this regard.