【修改】文件导出新增文件名称编写
This commit is contained in:
parent
c6da517c99
commit
a1e49464af
|
|
@ -494,13 +494,8 @@ public class ExcelUtil<T>
|
|||
*/
|
||||
public void exportExcel(HttpServletResponse response, List<T> list, String sheetName, String title)
|
||||
{
|
||||
|
||||
String fileName = "物料主数据导入模板.xlsx";
|
||||
String encodedFileName = null;
|
||||
encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + encodedFileName + "\"");
|
||||
this.init(list, sheetName, title, Excel.Type.EXPORT);
|
||||
exportExcel(response);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue