For a developer, who is trying to update XLTX files via Python application. Aspose.Total for Python via Java API can help to automate the updating process. It’s a full package of various APIs dealing different formats including Microsoft Excel files. Aspose.Cells for Python via Java API that is part of Aspose.Total for Python via Java package makes this modifying process easy. Below is the process of updating the XLTX document.
How to Update XLTX File in Python
- Create new Workbook class object having the source XLTX file as parameter
- Access of relevant Worksheet using getWorksheets().get(index) method
- Insert new data in the accessed cell using Worksheet.getCells().get(indexValue).putValue() method
- Save the file as .xltx file using save() method by passing the file with path as the parameter
Modification Requirements
- For XLTX modification, reference APIs within the project directly from PyPI ( Aspose.Cells )
- Or use the following pip command
pip install aspose.cells
- Moreover, Download the API package from the Downloads section
Code - Update XLTX File in Python
Explore File Editor Options with Python
Edit CSV
(Comma Seperated Values)
Edit TSV
(Tab-separated Values)
Edit XLS
(Microsoft Excel Binary Format)
Edit XLSB
(Excel Binary Workbook)
Edit XLSM
(Macro-enabled Spreadsheet)
Edit XLSX
(Open XML Workbook)
Edit XLT
(Excel 97 - 2003 Template)
Edit XLTM
(Excel Macro-Enabled Template)
Edit XLTX
(Excel Template)