导出Excel表格时出错
导出Excel表格时,前端只是弹窗显示jeecgExcelView然后就没有反应了,spring-mvc.xml中已配置
<context:component-scan base-package="org.jeecgframework.poi.excel.view">
Controller:
@RequestMapping("/excelReports")
public String excelReports(DeliveryReport deliveryReport) {
ModelMap map =new ModelMap();
SimpleDateFormat format = new SimpleDateFormat("HHmmss");
String date = format.format(new Date());
String fileName = date + "报表.xlsx";
List<DeliveryReport> deliveryReports = deliveryReportDao.getAll(deliveryReport);
ExportParams params = new ExportParams("报表", "报表", ExcelType.XSSF);// 1.表名2.sheet名称3.表格类型
params.setFreezeCol(0);
map.put(NormalExcelConstants.DATA_LIST, deliveryReports);
map.put(NormalExcelConstants.CLASS, DeliveryReport.class);
map.put(NormalExcelConstants.PARAMS, params);
map.put(NormalExcelConstants.FILE_NAME, fileName);
return NormalExcelConstants.EASYPOI_EXCEL_VIEW;
}
是没有配置好还是其他的问题
参考jeecg的代码
页:
[1]