How to Merge Microsoft Project Files Using C#
In order to merge MPP, MPT, MPX MS-Project, ORACLE Primavera, XML and PDF files we will use Aspose.Tasks for.NET API , which is a feature-rich, powerful, and easy-to-use document processing API for the C# platform.
You can select the merge type for different source files, such as MPP, MPT, MPX MS-Project, ORACLE Primavera, XML PDF, and save the result of merging files in one of the following formats: XER, JIRA, MPP, MPT, MPX and others.
The Aspose.Tasks for.NET API facilitates the process of merging MS-Project files for developers:
loads files using the
Project class
class;
Contains classes for working with properties
Aspose.Tasks.Properties
and the required output device;
LoadOptions
class allows to specify additional load parameters when loading a project from file or stream.
Online Microsoft Project Files Merger
You can merge Microsoft Project files with Aspose.Tasks for .NET API in real-time. Tasks Merger lets you combine multiple project class documents into a single file. You can select one of the following output formats: MPP, MPT, MPX MS-Project, ORACLE Primavera, XML and PDF. Load files, merge and get results in a few seconds!
var document1 = new Project(%first project file name %); var document2 = new Project(%second project file name%); document1.CalculationMode = CalculationMode.None; foreach (var firstLevelTasks in document2.RootTask.Children.ToList()) { document1.RootTask.Children.Add(firstLevelTasks); } document1.Save("merged.mpp", SaveFileFormat.Mpp);
Installing Aspose.Tasks for .NET library
Aspose.Tasks is an advanced web scraping and MSProject parsing library. This library supports parsing of all types of project files to construct a Document Object Model (DOM) based on the WHATWG DOM Standard. You can use several ways to install the Aspose.Tasks library for .NET on your system:
- Using the NuGet Package Manager GUI.
- Using the Package Manager Console .
- Installing Aspose.Tasks for .NET through MSI .
Use the Aspose.Tasks C# library to convert, merge, edit Microsoft Project documents, extract data from the web, and more! For more details about C# library installation, please refer to Aspose.Tasks Documentation.
Other Supported Aspose.Tasks for .NET API Features
Using Aspose.Tasks, an extended library for converting, merging, locking and unlocking MS project files, as well as viewing, downloading and retrieving metadata from project files. Our Aspose.Tasks API and .NET Library works with the following file extensions MPP, MPT, MPX MS-Project, ORACLE Primavera, XER, XML and PDF.