Przeglądaj źródła

fix poi

release_toaliyun_real
lin 2 lat temu
rodzic
commit
2c78a799b4
1 zmienionych plików z 14 dodań i 13 usunięć
  1. +14
    -13
      mallinkAdmin/src/main/java/com/iformall/controller/mem/AsyncTask.java

+ 14
- 13
mallinkAdmin/src/main/java/com/iformall/controller/mem/AsyncTask.java Wyświetl plik

@@ -404,19 +404,20 @@ public class AsyncTask {
}
private void exportExcel(HttpServletRequest request, HttpServletResponse response,List successList, Class dataClass, String fileName) throws Exception {
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
Workbook workBook = ExcelExportUtil.exportExcel(exportParams, dataClass, successList);
response.setContentType("application/octet-stream;charset=UTF-8");
//response.setHeader("Content-Type", "application/vnd.ms-excel");//xls
response.setHeader("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");//xlsx
response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes("GB2312"), "8859_1"));
response.addHeader("Pargam", "no-cache");
response.addHeader("Cache-Control", "no-cache");
OutputStream out = response.getOutputStream();
workBook.write(out);
out.flush();
out.close();
// ExportParams exportParams = new ExportParams();
// exportParams.setType(ExcelType.XSSF);
// Workbook workBook = ExcelExportUtil.exportExcel(exportParams, dataClass, successList);
// response.setContentType("application/octet-stream;charset=UTF-8");
// //response.setHeader("Content-Type", "application/vnd.ms-excel");//xls
// response.setHeader("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");//xlsx
// response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes("GB2312"), "8859_1"));
// response.addHeader("Pargam", "no-cache");
// response.addHeader("Cache-Control", "no-cache");
// OutputStream out = response.getOutputStream();
// workBook.write(out);
// out.flush();
// out.close();
excelService.exportExcel(successList, null, null, dataClass, fileName, response, false);
}
private String uploadErrorExcel(List successList, Class dataClass, String fileName) throws Exception {


Ładowanie…
Anuluj
Zapisz