For a developer, who is trying to update XLT files in any Java application. Aspose.Total for Java API can help to automate the updating process. It’s a full package of various Java APIs dealing multiple formats including Microsoft Excel documents. Aspose.Cells for Java API that is part of Aspose.Total for Java package makes this modifying process easy. Process of updating the XLT document is simple by firstly accessing the sheet and then update cell value in excel using java.
How to Update XLT File in Java
- Create new Workbook class object having the source XLT file as parameter
- Access of relevant Worksheet and relevant cell using getWorksheets().get(index).getCells().get(column) method
- Insert new data in the accessed cell using getCells().get(indexValue).setValue(data) method
- Save the file as .xlt file using save() method by passing the file with path as the parameter
Modification Requirements
- For XLT modification, Microsoft Windows or a compatible OS with Java Runtime Environment for JSP/JSF Application and Desktop Applications.
- J2SE 6.0 (1.6), J2SE 7.0 (1.7), or above.
- Get latest API version directly from Downloads
Code - Update XLT File in Java
Explore File Editor Options with Java
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)