InputStream templateInputStream = new FileInputStream("template.xlsx");
XLSTransformer transformer = new XLSTransformer();
Workbook workbook = transformer.transformXLS(templateInputStream, context);
FileOutputStream outputStream = new FileOutputStream("output.xlsx");
workbook.write(outputStream);
outputStream.close();
<dependency>
<groupId>org.jxls</groupId>
<artifactId>jxls-core</artifactId>
<version>2.8.0</version>
</dependency>