public void bulletinPeopleEndExcelOut() {
try {
SimpleDateFormat dateToStr = new SimpleDateFormat("yyyyMMdd");
//采用标准格式 这样不会出现有汉字无法显示的问题
String fileName = new String(("公安重点人员导入模板_" + dateToStr.format(new Date()) + ".xls").getBytes("gb2312"),"iso8859-1");
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-disposition", "attachment;filename="+fileName);
EasyExcel.write(response.getOutputStream(), BulletinPeopleTitleInfo.class).sheet("模板").doWrite(null);
} catch (IOException e) {
e.printStackTrace();
}
}
09-01
1962
06-24
451
02-23
5782
08-09
5765
11-06
1万+
11-04
1348