mpp to html

Convert Microsoft project file to HTML in C# .NET.

Managing and sharing project plans created in Microsoft Project (MPP) can be challenging, especially when stakeholders do not have access to specialized software like MS Project. Therefore, the conversion of MPP files to HTML provides a practical solution by making project data universally accessible through any web browser. This article explains the details on how to develop MS Project viewer using .NET REST API.

REST API to Manipulate MS Project Files

GroupDocs.Conversion Cloud SDK for .NET offers an efficient and straightforward way to create a web-based MS Project viewer by converting MPP to HTML format. The SDK preserves all key project details such as tasks, timelines, resources, and dependencies, ensuring that the output remains consistent with the original file. Now, in order to use the SDK, first we need to install it by searching GroupDocs.Conversion-Cloud in NuGet package manager and click the Install button. Another option is to execute the following command in package manager console.

NuGet\Install-Package GroupDocs.Conversion-Cloud -Version 24.2.0

Once the installation is completed, please obtain your personalized API credentials(i.e. Client ID and Client Secret). You may visit this short tutorial explaining the details on how to get the API credentials.

MS Project Viewer in C# .NET

Let’s explore the details on how we can integrate the MPP to HTML conversion functionality directly into our .NET applications, enabling on-the-fly conversions and creating an interactive project viewer.

  1. Create an instance of Configuration class where we pass client credentials as arguments.
var configurations = new Configuration(clientId, clientSecret1);
  1. Initialize the ConvertApi where we pass Configuration object as an input argument.
var apiInstance = new ConvertApi(configurations);
  1. Upload the input MS Project file to the cloud storage.
fileUpload.UploadFile(new UploadFileRequest("Home move plan.mpp", stream));
  1. Create an instance ConvertSettings where we specify the name for input MPP, resultant format as html and the name of the resultant HTML file as arguments.
var settings = new ConvertSettings{...}
  1. Call the ConvertDocumentRequest API to convert MPP to HTML and save the resultant HTML to the cloud storage.
var response = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings));
mpp to html

Image:- A preview of Microsoft Project File to HTML conversion.

The input MS Project file used in the above example can be downloaded from Home move plan.mpp.

Microsoft Project Reader using cURL commands

Converting MPP files to HTML using GroupDocs.Conversion Cloud and cURL commands is an ideal approach for those seeking a simple and automated solution. By using cURL, you can easily send API requests to GroupDocs.Conversion Cloud, enabling you to convert Microsoft Project (MPP) files to HTML format without the need for extensive coding.

The first step in this approach is to generate a JWT access token and then, execute the following cURL command to develop Microsoft project viewer online by transforming MPP to HTML format. After successful conversion, the resultant HTML is stored in the cloud storage.

curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-X POST \
-H "accept: application/json" \
-H "authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-d "{  \"StorageName\": \"default\",  \"FilePath\": \"{inputMPP}\",  \"Format\": \"html\", \"OutputPath\": \"{resultantFile}\"}"

Please replace inputMPP with the name of input MS Project file, resultantFile with the name of resultant HTML file and accessToken with personalized JWT access token.

  • Please execute the following cURL command to save the resultant HTML on local drive.
curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-X POST \
-H "accept: application/json" \
-H "authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-d "{  \"StorageName\": \"default\",  \"FilePath\": \"{inputMPP}\",  \"Format\": \"html\"}" \
-o "myConverted.html"

MPP to HTML Conversion App

In order to experience the capabilities of GroupDocs.Conversion Cloud REST API, you may consider using our free HTML to PowerPoint Converter App. This lightweight and super-efficient App, enabling you to experience the amazing capabilities of REST API within a web browser.

mpp to html conversion app

Conclusion

Converting MPP files to HTML format is a practical solution for organizations that need a flexible, web-based method to share project data. Whether you opt for the comprehensive GroupDocs.Conversion Cloud SDK for .NET or the simple and automated cURL command approach, both methods make it easy to transform Microsoft Project files into an accessible format that can be viewed in any browser. We encourage you to explore these solutions to enhance your project management and collaboration efforts by making project information more accessible and shareable.

We highly recommend visiting the following links to learn more about: