/**
* 导出excel
*
* @date:2012-07-10 09:48:34
* @return
*/
public String exportExcel() {
page.setPageSize(60000);
qxXjCzxjkList = qxCzReportService.list(queryObj, page);
excelName = "初中学籍信息表-" + stgm.util.DateUtil.getNowTimeShort() + ".xls";
excelStream = new stgm.util.ExcelUtil().exportExport(excelName,
qxXjCzxjkList, selectFields, qxXjCzxjkFields);
try {
excelName = java.net.URLEncoder.encode(excelName, "UTF-8"); // 这句很重要,不然文件名为乱码
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
// 导出方法
return SUCCESS;
}
java应该有专门导出excel的库的,就像.net中的npoi