PPT/PPTX files are most widely used in business and educational organizations. These files are used to deliver various types of presentations. Moreover, you can insert rich media items and can set eye-catching layouts to make your presentation even more attractive and readable. However, manipulating a huge number of PPT files manually takes an immense amount of time. Therefore, we’ll use this C# PowerPoint library to compare two PowerPoint Files in C# programmatically.
We will cover the following points:
- C# PowerPoint library
- Compare two PowerPoint files in C#
- Retrieve PowerPoint Slide properties programmatically
C# PowerPoint library
This library is lightweight and offers comprehensive documentation regarding installation. Therefore, you can either download this C# PowerPoint library or install it by running the following commands in the NuGet PM.
Compare two PowerPoint files in C#
You can use this powerful library to process and manipulate your presentation slides programmatically.
Please follow the steps and the code snippets mentioned here:
- Load the two PPTX files by creating an instance of the Presentation class.
- Access the Masters property that returns a list of all master slides that are defined in the presentation.
- Loop through all the slides of both PPTX files.
- Check if there is a match among the slides of both PPTX files by invoking the Equals method.
Copy & paste the following code into your main file:
Retrieve PowerPoint Slide properties programmatically
In addition, you may configure your API calls to meet your business requirements. This C# PowerPoints library comes up with a wide range of methods that you may check here.
However, you may follow the steps and the code snippet mentioned below:
- Get info about the presentation in the specified file by calling the GetPresentationInfo method.
- Invoke the ReadDocumentProperties method to get the document properties of binded presentation.
- Assign the document properties to the object of the IDocumentProperties.
- CreatedTime property will let you know about the date when a presentation was created.
- You can retrieve the subject of the PPTX file by accessing Subject property.
- Title property will extract the title information.
Get a Free License
You can avail a free temporary license to try the API without evaluation limitations.
We may end this blog post here. We have demonstrated how to compare two PowerPoint files in C# programmatically. Above all, we also have gone through some advanced methods exposed by this C# PowerPoint library. Further, you may visit the documentation to know about other methods. Finally, please visit conholdate.com for the latest updates.
Ask a question
You can let us know about your questions or queries on our forum.
How do you compare two presentations and merge results in PowerPoint?