<dependency>
<groupId>org.jxls</groupId>
<artifactId>jxls-core</artifactId>
<version>2.6.0</version>
</dependency>
InputStream templateInputStream = new FileInputStream("path/to/template.xls");
OutputStream targetOutputStream = new FileOutputStream("path/to/output.xls");
Context context = new Context();
context.putVar("data", yourDataObject);
JxlsHelper.getInstance().processTemplate(templateInputStream, targetOutputStream, context);