Save MS Project files into various formats using C# and Aspose.Tasks for .NET
Tags: msproject, primavera, csharp, pdf
Published: 2020-04-17 09:14:27

<a href="https://products.aspose.com/tasks/net">Aspose.Tasks for .NET</a> is a reliable project management API to process Microsoft Project files. API supports reading, writing and manipulating Microsoft Project documents without any other software dependencies.

Presented below is a shorthand article describing how to convert <a href="https://products.office.com/en-us/project/project-management-software">Microsoft Project</a> files (composed in native Project formats: MPP, MS Project XML) into the non-Microsoft project formats: graphical (PNG, BMP, JPEG, TIFF, SVG, PDF), <a href="https://www.oracle.com/industries/construction-engineering/primavera-products/">Primavera</a>(Primavera XML, XER).

<h2>Create a new Microsoft Project document and save it to other Microsoft Project file formats</h2>

Aspose.Tasks for .NET allows to create a project from scratch and convert it into other Microsoft Project file formats (such as Microsoft Project XML, Microsoft Project MPX):

{% gist https://gist.github.com/aspose-com-gists/f192129474774971a10338ff3bd27672 file=CreateProjectAndSaveToMSFormats.cs %}

<h2>Convert Microsoft Project files into graphical formats</h2>
Aspose.Tasks for .NET can read a project file from native project formats (MPP, MPX, Microsoft Project XML) and save it into any of graphical formats: PNG, BMP, JPEG, TIFF, SVG, PDF. There are two main approaches. The first allows a user to easily save a project into any of the available formats by specifying one of Aspose.Tasks.SaveFileFormat enum members:

{% gist https://gist.github.com/aspose-com-gists/f192129474774971a10338ff3bd27672 file=SaveToGraphicalFormatsEnums.cs %}

Another approach is a usage of special setting classes that allow to tune the saving options.
{% gist https://gist.github.com/aspose-com-gists/f192129474774971a10338ff3bd27672 file=SaveToGraphicalFormatsOptionsPDF.cs %}
{% gist https://gist.github.com/aspose-com-gists/f192129474774971a10338ff3bd27672 file=SaveToGraphicalFormatsOptionsTIFF.cs %}

<h2>Convert Microsoft Project files into Primavera formats</h2>
Along with saving in graphical formats Aspose.Tasks for .NET supports conversion into Oracle Primavera formats (e.g. Primavera XML, Primavera XER):
{% gist https://gist.github.com/aspose-com-gists/f192129474774971a10338ff3bd27672 file=SaveMPPToPrimavera.cs %}

<h2>Convert Microsoft Project files into other formats</h2>

Aspose.Tasks for .NET also supports a conversion of project files to HTML, XLS, XLSX, XAML, TXT formats:

{% gist https://gist.github.com/aspose-com-gists/f192129474774971a10338ff3bd27672 file=SaveMPPAsHtml.cs %}
{% gist https://gist.github.com/aspose-com-gists/f192129474774971a10338ff3bd27672 file=SaveToTxtAndXLSX.cs %}

<h2>How to try</h2>
You can try the above-mentioned features with your projects in our free web <a href="https://products.aspose.app/tasks/conversion">Aspose.Tasks Conversion</a> app - it uses the same engine under the hood.
The whole set of examples that shows the features of saving project files into various formats are in our <a href="https://github.com/aspose-tasks/Aspose.Tasks-for-.NET/">GitHub</a> repository. The latest version of Aspose.Tasks for .NET is always available on the <a href="https://downloads.aspose.com/tasks">official Aspose website</a> or via <a href="https://www.nuget.org/packages/Aspose.Tasks/">NuGet package</a>.