MS Excel compatibility checker ensures that a file in an older format does not use the features provided by the newer Excel version. Thus, people using older versions of Excel do not face compatibility issues. While manipulating Excel files, you may need to disable the compatibility checker dynamically. To achieve it, this article shows how to disable the compatibility checker for MS Excel workbooks in Python.
Python Library to Disable Excel Compatibility Checker
Aspose.Cells for Python via Java is a powerful and feature-rich spreadsheet manipulation API. It provides basic as well as advanced features to create and manipulate MS Excel files. We will use this library to enable or disable the compatibility checker in Excel files. You can either download the API or install it using the following pip command.
> pip install aspose-cells
Disable Excel Compatibility Checker
In order to enable or disable the compatibility checker for an Excel workbook, you need to update the workbook’s settings. The following are the steps to perform this operation.
- First, load the Excel file using Workbook class.
- Then, disable compatibility checker using Workbook.getSettings().setCheckCompatibility(boolean) method (set True and False to enable and disable checker, respectively).
- Finally, save the updated workbook using Workbook.save(string) method.
The following code sample shows how to disable the compatibility checker using Python.
Get a Free License
You can use Aspose.Cells for Python via Java without evaluation limitations using a temporary license.
Conclusion
MS Excel compatibility checker restricts the users to use newer features in an older version of Excel file. In this article, you have seen how to disable compatibility checker in Excel files using Python. Besides, you can also explore other features of Aspose.Cells for Python via Java using the documentation. In case you would have any queries, you can post on our forum.