Microsoft Project Files Conversion Via C#

Convert Microsoft Project MPP, MPT, MPX to PDF, Excel, HTML and Images including BMP, JPG, PNG, TIFF to build cross-platform .NET applications.

Microsoft Project application is to assist project managers for complete planning, tracking progress, assigning resources and analyzing workloads. And whenever there is need to handle Microsoft Project MPP, MPT, MPX files within company .NET solution without installing Microsoft Project, .NET Project file handling API is there to do all this. It can easily manage, create, modify documents as well as convert to other files. Below code works perfactly well and can easily be integrated within the solution.

Microsoft Project to PDF Conversion

Microsoft Project to PDF conversion, Process is, Load the Microsoft Project file MPP, MPT or MPX using Project class . Call the save method and with output PDF file and SaveFileFormat .PDF as parameters. During conversion process all the tasks, resources, and resource assignment data will be rendered.

C# Code for Microsoft Project to PDF Conversion

1. // load the file to be converted

2. var prjectToHTML = new Project(dir + "template.mpp");

3. // save in different formats

4. prjectToHTML.Save(dir + "output.html", SaveFileFormat.HTML);

Convert Microsoft Project to Images JPG, PNG, BMP, TIFF

Converting Microsoft Project files MPP, MPT, MPX to image formats is almost same, the only difference is SaveFileFormat extension and image format. So Just load the file using Project class and call the save method while passing the relevant output image format and SaveFileFormat as parameters. If there is need for additional Image settings, API provides ImageSaveOptions to save rendered images in JPG, PNG, BMP or TIFF files.

C# Code for Converting Microsoft Project to Image Formats

1. // load project file

2. var projectToImages = new Project(dir + "template.mpp");

3. // create ImageSaveOptions with desired Image format currently MPP to JPG

4. var ImageOptions = new ImageSaveOptions(Aspose.Tasks.Saving.SaveFileFormat.JPEG)

5.  {
    CustomPageSize = new SizeF(2200, 1100),
    HorizontalResolution = 96f,
    VerticalResolution = 96f,

    JpegQuality = 70

    };

6. // render data to image format

7. projectToImages.Save(dir + "output.jpg", ImageOptions);

Microsoft Project to HTML Conversion

Process of conversion of Microsoft Project to HTML is almost same as of PDF, the only difference is SaveFileFormat HTML extension. So Just load the file using Project class and call the save method while passing the relevant output HTML file and SaveFileFormat.HTML as parameters.

C# Code for Microsoft Project to HTML Conversion

1. // Read the input Project MPP file
2. Project projectToCSV = new Project("Project.mpp");

3. // Initialize CsvOptions class instance
4. Aspose.Tasks.Saving.CsvOptions CSVOpts = new Aspose.Tasks.Saving.CsvOptions();
5. CSVOpts.TextDelimiter = Aspose.Tasks.Saving.CsvTextDelimiter.Semicolon;

6. // Save output CSV file
7. projectToCSV.Save("output.csv", CSVOpts);

Convert Microsoft Project to Excel XLSX, CSV File

.NET MS Project Files API proivdes XlsxOptions for converting Project to XLSX and CsvOptions for converting MPP, MPT, MPX to CSV files. Developers can specify relevant options by using these classes. All other process is same.

C# Code for Microsoft Project to CSV Conversion

1. // load the file to be converted

2. var prjectToHTML = new Project(dir + "template.mpp");

3. // save in different formats

4. prjectToHTML.Save(dir + "output.html", SaveFileFormat.HTML);

Other Supported Conversions

Other JIRA Conversion Formats

JIRA TO BMP (Bitmap Image File)
JIRA TO HTML (Hyper Text Markup Language)
JIRA TO JIRA (Proprietary Issue Tracking Product)
JIRA TO JPEG (JPEG Image)
JIRA TO MPP (Microsoft Project Data File)
JIRA TO MPT (Microsoft Project Template Files)
JIRA TO MPX (Microsoft Exchange File Format)
JIRA TO PDF (Portable Document Format)
JIRA TO PNG (Portable Network Graphics)
JIRA TO SVG (Scalable Vector Graphics)
JIRA TO PRIMAVERA XML (eXtensible Markup Language)
JIRA TO TIFF (Tagged Image File Format)
JIRA TO TXT (Text Document)
JIRA TO XER (XER file format)
JIRA TO XLS (Microsoft Excel Spreadsheet)
JIRA TO XLSX (OOXML Excel File)
JIRA TO XML (Extensible Markup Language)
JIRA TO XPS (XML Paper Specifications)

Other MPP Conversion Formats

MPP TO BMP (Bitmap Image File)
MPP TO HTML (Proprietary Issue Tracking Product)
MPP TO JIRA (Proprietary software issue tracking)
MPP TO JPEG (JPEG Image)
MPP TO MPP (Microsoft Project Data File)
MPP TO MPT (Microsoft Project Template Files)
MPP TO MPX (Microsoft Exchange File Format)
MPP TO PDF (Portable Document Format)
MPP TO PNG (Portable Network Graphics)
MPP TO PRIMAVERA XML (eXtensible Markup Language)
MPP TO SVG (Scalable Vector Graphics)
MPP TO TIFF (Tagged Image File Format)
MPP TO TXT (Text Document)
MPP TO XER (XER file format)
MPP TO XLS (Microsoft Excel Spreadsheet)
MPP TO XLSX (OOXML Excel File)
MPP TO XML (Extensible Markup Language)
MPP TO XPS (XML Paper Specifications)

Other MPT Conversion Formats

MPT TO BMP (Bitmap Image File)
MPT TO HTML (Proprietary Issue Tracking Product)
MPT TO JIRA (Proprietary software issue tracking)
MPT TO JPEG (JPEG Image)
MPT TO MPP (Microsoft Project Data File)
MPT TO MPT (Microsoft Project Template Files)
MPT TO MPX (Microsoft Exchange File Format)
MPT TO PDF (Portable Document Format)
MPT TO PNG (Portable Network Graphics)
MPT TO PRIMAVERA XML (eXtensible Markup Language)
MPT TO SVG (Scalable Vector Graphics)
MPT TO TIFF (Tagged Image File Format)
MPT TO TXT (Text Document)
MPT TO XER (XER file format)
MPT TO XLS (Microsoft Excel Spreadsheet)
MPT TO XLSX (OOXML Excel File)
MPT TO XML (Extensible Markup Language)
MPT TO XPS (XML Paper Specifications)

Other MPX Conversion Formats

MPX TO BMP (Bitmap Image File)
MPX TO HTML (Proprietary Issue Tracking Product)
MPX TO JIRA (Proprietary software issue tracking)
MPX TO JPEG (JPEG Image)
MPX TO MPP (Microsoft Project Data File)
MPX TO MPT (Microsoft Project Template Files)
MPX TO MPX (Microsoft Exchange File Format)
MPX TO PDF (Portable Document Format)
MPX TO PNG (Portable Network Graphics)
MPX TO PRIMAVERA XML (eXtensible Markup Language)
MPX TO SVG (Scalable Vector Graphics)
MPX TO TIFF (Tagged Image File Format)
MPX TO TXT (Text Document)
MPX TO XER (XER file format)
MPX TO XLS (Microsoft Excel Spreadsheet)
MPX TO XLSX (OOXML Excel File)
MPX TO XML (Extensible Markup Language)
MPX TO XPS (XML Paper Specifications)

Other Primavera XML Conversion Formats

Primavera XML TO BMP (Bitmap Image File)
Primavera XML TO HTML (Proprietary Issue Tracking Product)
Primavera XML TO JIRA (Proprietary software issue tracking)
Primavera XML TO MPP (Microsoft Project Data File)
Primavera XML TO MPT (Microsoft Project Template Files)
Primavera XML TO MPX (Microsoft Exchange File Format)
Primavera XML TO PDF (Portable Document Format)
Primavera XML TO PNG (Portable Network Graphics)
Primavera XML TO PRIMAVERA XML (eXtensible Markup Language)
Primavera XML TO SVG (Scalable Vector Graphics)
Primavera XML TO TIFF (Tagged Image File Format)
Primavera XML TO TXT (Text Document)
Primavera XML TO XER (XER file format)
Primavera XML TO XLS (Microsoft Excel Spreadsheet)
Primavera XML TO XLSX (OOXML Excel File)
Primavera XML TO XML (Extensible Markup Language)
Primavera XML TO XPS (XML Paper Specifications)

Other XML Conversion Formats

XML TO BMP (Bitmap Image File)
XML TO HTML (Proprietary Issue Tracking Product)
XML TO JIRA (Proprietary software issue tracking)
XML TO JPEG (JPEG Image)
XML TO MPP (Microsoft Project Data File)
XML TO MPT (Microsoft Project Template Files)
XML TO MPX (Microsoft Exchange File Format)
XML TO PDF (Portable Document Format)
XML TO PNG (Portable Network Graphics)
XML TO XML (eXtensible Markup Language)
XML TO SVG (Scalable Vector Graphics)
XML TO TIFF (Tagged Image File Format)
XML TO TXT (Text Document)
XML TO XER (XER file format)
XML TO XLS (Microsoft Excel Spreadsheet)
XML TO XLSX (OOXML Excel File)
XML TO XML (Extensible Markup Language)
XML TO XPS (XML Paper Specifications)