2
异常代码
String fileName = "Withdrawals agency record " + model.getCreateTime().split(" ")[0]+ "_" + model.getReturnTime().split(" ")[0] + ".xlsx";
// _response.setContentType("multipart/form-data");
_response.setHeader("Content-Disposition", "attachment;fileName=" + fileName);
_response.setContentType("application/vnd.ms-excel");
_response.setCharacterEncoding("utf-8");
ExcelWriter writer = new ExcelWriter(out, ExcelTypeEnum.XLSX);
Sheet sheet = new Sheet(1, 1, AgencyWithdrawExport.class);
sheet.setSheetName(fileName);
//写出数据
writer.write(createModelList(
model.getUuid(),
model.getAgencyId(),
model.getAuditStatus(),
model.getUid(),
model.getLevel(),
model.getCreateTime(),
model.getReturnTime()), sheet);
writer.finish();
out.close();