Excel spreadsheets are commonly used to store small or large sized data conveniently. Moreover, you can visualize the spreadsheet data and perform differnet operations to manipulate it. XLS was the earlier file format that was used by Microsoft Excel to store spreadsheet data. Although Microsoft introduced XLSX in 2007 with extended features and capabilities, various people still use XLS format that you have to convert to XLSX afterwards. In this article, you will learn how to convert XLS files to XLSX format programmatically in Python.
Python Library for XLS to XLSX Conversion
Aspose.Cells for Python is a powerful Python library to create and process spreadsheet documents. Furthermore, it lets you convert the spreadsheet files from one format to other. We will use this library to convert our XLS files to XLSX. You can install it into your Python applications from PyPI using the following pip command.
pip install aspose-cells
Convert an XLS File to XLSX in Python
The conversion of XLS to XLSX is as simple as pie. Simply load the XLS file and save it as XLSX. The following are the steps to perform XLS to XLSX conversion in Python.
The following code sample shows how to save an XLS file as XLSX format in Python.
Get a Free License
You can get a free temporary license to use Aspose.Cells for Python without evaluation limitations.
In this article, you have learned how to convert XLS files to XLSX programmatically in Python. You can simply install the library and integrate XLS to XLSX conversion within your Python applications. In addition, you can learn more about Aspose.Cells for Python using the documentation. Also, you can share your questions or queries via our forum.