This sample demonstrates how to export a collection of depatments and their employees using jx:forEach tag
List departmens = new ArrayList(); // initilize list of departments in some way Map beans = new HashMap(); beans.put("departments", departments); XLSTransformer transformer = new XLSTransformer(); transformer.transformXLS(templateFileName, beans, destFileName);
Template file screenshot
You can also download Excel version basictags.xls
Output file looks like
Download excel file here basictags_output.xls