1)需要的JAR包 [color=violet](Y*_*Y)[/color]
[list]
[*]jxls-core-0.9.5.jar
[*]jxls-reader-0.9.5.jar
[*]poi-3.0.1-FINAL-20070705.jar
[/list]
2)废话不多说直接上代码 :)
3)还要Excel模板一块,可参考 [color=cyan][#_#]![/color]
[url]http://jxls.sourceforge.net/index.html[/url]
4)最后祝大家能成功。[color=red]{^o^}[/color]
[list]
[*]jxls-core-0.9.5.jar
[*]jxls-reader-0.9.5.jar
[*]poi-3.0.1-FINAL-20070705.jar
[/list]
2)废话不多说直接上代码 :)
Map<String, List<CustomerExcelBean>> beans = new HashMap<String, List<CustomerExcelBean>>();
beans.put("customer", dataList);
XLSTransformer transformer = new XLSTransformer();
try {
transformer.transformXLS(getRootPath(), beans, getProjectPath()
+ exportFileUrl);
3)还要Excel模板一块,可参考 [color=cyan][#_#]![/color]
[url]http://jxls.sourceforge.net/index.html[/url]
4)最后祝大家能成功。[color=red]{^o^}[/color]