Import/Export Projects to Primavera

Primavera Proprietary Exchange Format (XER), by Oracle Inc., is primarily associated with Primavera P6 Project Management solution. Aspose.Tasks for .NET provides the capability to export Microsoft Project Data to Primavera XER as well as XML (or P6XML) formats. This article shows how to import or export MS Project MPP data to Primavera supported formats.

Importing Data from Primavera File

Importing Data from Primavera XML File Formats

Aspose.Tasks can import Primavera XML similar to Microsoft Project XML and MPP formats. The Project class provides the capability of loading such type of file using the same constructor as used for other Project files.

Importing Data from Primavera MPX File Formats

Reading Project UIDs from Primavera XML file

A Primavera XML file may contain multiple projects, each having its own UID. Aspose.Tasks for .NET API provides the capability to read all such UIDs from the project and then load a project using a specific id from the list of UIDs.

Reading Primavera XML file with Multiple Projects

Importing Project Data From Primavera Database

Aspose.Tasks for .NET API provides the capability to read Project data from Primavera Database. The following example code shows how to use the Project class for reading from the database.

Support for Primavera SQLite Database

Aspose.Tasks for .NET provides support for reading project data from Primavera P6 standalone SQLite database.

Exporting Project Data in Primavera Formats

The SaveFileFormat enumerator is used to specify the project export type as Primavera XML or XER.

Exporting Project Data to Primavera XML Format

Exporting Project Data to Primavera XER Format

Exporting Project Data to Primavera MPX Format

Primavera XML Save Options

If Primavera XML file doesn’t have any WBS inside (only Activities), Aspose.Tasks can’t read properly this type of file, because the API needs a root task to create a tree of tasks. In this case, the API creates a RootTask, even if it doesn’t exist in the file, to be able to read these particular files. If the user wants to save after reading, It’ll be saving with created RootTask, which did not exist before reading. This option helps to decide how to save into the file with created RootTask or not. By default it is set to true.