This simple topic entails how to convert PPT to PPTX in Python with the help of a few lines of code. It covers all the configuration details and runnable sample code is also part of this tutorial that can be used to develop a PPT to PPTX converter in Python. You will also learn to customize the loading of the source PPT file and save the PPTX file.
Steps to Convert PPT to PPTX in Python
- Set up your environment to use Aspose.Slides for Python via .NET in your application to convert PPT to PPTX
- Include aspose.slides namespaces in your project for exporting PPT to PPTX
- Using the LoadOptions, set the load format and password to read the PPT
- Load the source PPT using the Presentation class with the specified load options
- The save method converts PPT to PPTX in Python
These detailed steps guide us to change PPT to PPTX in Python using a simple API interface. The LoadOptions class object is declared in the beginning to set the presentation load format and the password of a password protected PPT file before loading the presentation and saving that as PPTX. The password property is optional and used only if the source presentation is password protected.
Code to transform PPT to PPTX in Python
This code assists in the development of a basic PPT to PPTX converter software in Python where LoadOptions class also contains other properties including setting spreadsheet options to decide the formula calculation for charts etc., management of external resources, setting warning callbacks, and interruption token to name a few. One may also perform other advanced operations as well like modifying the loaded PPT file similar to MS PowerPoint before saving it as a PPTX.
This tutorial has walked you through how to change PPT to PPTX in Python, however, if you want to learn other types of conversions like converting a presentation to a PDF, refer to the article on how to convert Presentation to PDF using Python.