I don't want to define an excel template like writing jsp, and then input variables into the excel template like using jstl and el expressions. Now it's easy to use jxls, the core code is very simple. [Java] // call the engine to generate an excel report XLSTransformer transformer = new XLSTransformer (); Workbook workbook = transformer. transformMultipleSheetsList (is, objects, listSheetNames, "list", new HashMap (), 0); www.2cto. comworkbook. write (new FileOutputStream ("c :\\ xlsExportUtils.xls"); let's take a look at how the excel template is defined. Is it like jstl in jsp. The complete code for this test example is as follows: [java] import java. io. fileInputStream; import java. io. fileOutputStream; import java. io. IOException; import java. util. arrayList; import java. util. hashMap; import java. util. list; import java. util. map; import net. sf. jxls. exception. parsePropertyException; import net. sf. jxls. transformer. XLSTransformer; import org. apache. poi. openxml4j. exceptions. invalidFormatException; import org. apache. poi. ss. usermodel. workbook;/*** @ author luju **/public class XlsExportUtil {public static void createExcel () throws ParsePropertyException, InvalidFormatException, IOException {}@ SuppressWarnings ("rawtypes ") public static void main (String [] args) throws ParsePropertyException, InvalidFormatException, IOException {// obtain the Excel template file String fileDir = XlsExportUtil. class. getResource (""). getFile (); String filePath = fileDir + "XlsExportUtilTemplate.xls"; System. out. println ("excel template file:" + filePath); FileInputStream is = new FileInputStream (filePath); // create the Test Data Map <String, Object> map = new HashMap <String, object> (); List <Map <String, Object> list = new ArrayList <Map <String, Object> (); Map <String, object> map1 = new HashMap <String, Object> (); map1.put ("name", "TV"); map1.put ("price", "3000 "); map1.put ("desc", "3D TV"); map1.put ("Remarks", "Chinese test"); Map <String, Object> map2 = new HashMap <String, object> (); map2.put ("name", "Air conditioner"); map2.put ("price", "2000"); map2.put ("desc", "Inverter Air Conditioner "); map1.put ("Remarks", "test Chinese"); list. add (map1); list. add (map2); map. put ("list", list); ArrayList <List> objects = new ArrayList <List> (); objects. add (list); objects. add (list); objects. add (list); objects. add (list); // sheet Name List <String> listSheetNames = new ArrayList <String> (); listSheetNames. add ("1"); listSheetNames. add ("2"); listSheetNames. add ("3"); listSheetNames. add ("4"); // call the engine to generate an excel report XLSTransformer transformer = new XLSTransformer (); Workbook workbook = transformer. transformMultipleSheetsList (is, objects, listSheetNames, "list", new HashMap (), 0); workbook. write (new FileOutputStream ("c :\\ xlsExportUtils.xls "));}}