excel导出文件名拼装bug修复

pull/34/head
yxx 2022-08-17 13:31:08 +08:00
parent 0bc68d87a6
commit fbdb04f3d0
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ public class OfficeExcel implements OfficeExcelApi {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
String fileName = URLEncoder.encode(excelExportParam.getFileName(), "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", String.format("%s%s", "attachment;filename*=utf-8''", fileName, excelTypeEnum.getValue()));
response.setHeader("Content-disposition", String.format("%s%s%s", "attachment;filename*=utf-8''", fileName, excelTypeEnum.getValue()));
EasyExcel.write(response.getOutputStream(), excelExportParam.getClazz()).excelType(excelTypeEnum).sheet(excelExportParam.getSheetName()).doWrite(excelExportParam.getDataList());