How to Merge MPT to MPP using C# or the .NET API Solution
In order to Merge MPT to MPP, we’ll use Aspose.Tasks for .NET API which is a feature-rich, powerful and easy to use document manipulation and conversion API for C# platform. Open NuGet package manager, search for Aspose.Tasks and install. You may also use the following command from the Package Manager Console. You can create a connection between MPT and MPP using C#. First, you should use the Aspouse.Tasks API to access MPT and MPP projects. Next, you should get the data from the existing MPT fields and match the xz with the corresponding fields in MPP. You should then use the API to create the missing fields in MPP. Add new fields with data from the MPT project using .Net. This process will merge MPT and MPP data into a C# application.
Manage NuGet packages with the Visual Studio Package
Package Manager Console Command
PM> Install-Package Aspose.Tasks
Steps to Merge MPT to MPP via C#
Developers can easily load & merge MPT files to MPP in just a few lines of code.
- Decide what entities from MPT you what to merge and how you want to map it on MS Project entities (user stories => tasks, created US date => started date, etc)
- Create new instance of Project class
- Parse MPT format to get required entities (for example if you want parse *.csv Jira backup file you may want to use Aspose.Cells)
- Add parsed entities to the created instance of Project class
- Use common .NET components to create and Fill MPT backup file format (*.csv)
System Requirements
Before running the conversion example code, make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with .NET Framework, Mono and COM Interop.
- Development environment like Microsoft Visual Studio.
- Aspose.Tasks for .NET DLL referenced in your project.
Online MPT Merger
Test the quality of MPT merging right in your browser! Please load MPT files from the local file system or a URL, select the required output format and run the example! Combining project files can be a great way to consolidate your data and make it easier to manage. Aspose.Tasks Merge Tools is a great way to save time and reduce the effort involved in managing multiple MPT files. Test the quality of the process right in your browser, load files from the local file system or a URL, select the desired output format and run the example. It is fast, easy, secure and completely free!
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);
General information about MPT format
Microsoft Project Template files are data files that are used in Microsoft Project 2016. They include three types of software. They are often used on mobile devices as well as on desktop PCs. They are fully supported by Windows, and partially supported by Linux and Mac. This is not the most popular data format.Template files contain information about the template and the data associated with it. However, it has the extension MPT. The most important file is often called Global.mpt. This file contains information about the formats and data of all projects, but it cannot store resources and their assignments.
FAQ section
FAQ about MPT to MPP merging
1. Why is this MPT Merger useful?
MPT Merger is a practical, powerful and fast tool to combine several MPT files. You can quickly and easily merge MPT documents into one and save the result in MPP, MPT, MPX, and XML formats without any hassle!
2. How can I merge MPT?
You can merge MPT online or programmatically. To merge MPT documents online, simply upload files from your computer or a URL, select the desired output format from the list and hit the ‘Run’ button. You will get the result in no time. Furthermore, you can copy the C# code and use it in your own application for document merging.
3. Can I merge MPT on Linux, Mac OS, iOS or Android?
You can use this free online MPT Merger from a mobile device, tablet or computer. The interface of the Merger is intuitive and user-friendly. Our tool is compatible with all major operating systems and their respective browsers, including Windows, Mac OS, Linux, Android, and iOS. No additional software installation is required to get this tool running.
Other Supported MPT Merging
You can also merge MPT with any other file formats: