This commit is contained in:
2023-05-18 17:29:02 +08:00
parent 9be00db5e4
commit e41797c750
28 changed files with 413 additions and 105 deletions

View File

@ -29,7 +29,6 @@ import java.util.NoSuchElementException;
*/
public class ExcelUtil {
/**
* 默认导出
*
@ -67,8 +66,8 @@ public class ExcelUtil {
private static void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) {
try {
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type" , "application/vnd.ms-excel");
response.setHeader("Content-Disposition" , "attachment;filename=" + URLEncoder.encode(fileName + ".xlsx" , "UTF-8"));
response.setHeader("content-Type", "application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName + ".xlsx", "UTF-8"));
workbook.write(response.getOutputStream());
IOUtils.closeQuietly(workbook);
} catch (IOException e) {