【修改】文件导出新增文件名称编写

This commit is contained in:
nmy 2023-12-05 16:16:35 +08:00
parent a1e49464af
commit bd8c62efa4
1 changed files with 1 additions and 1 deletions

View File

@ -475,7 +475,7 @@ public class ExcelUtil<T>
{
String encodedFileName = null;
encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8);
encodedFileName = URLEncoder.encode(fileName+".xlsx", StandardCharsets.UTF_8);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");