Browse Source

Merge remote-tracking branch 'remotes/origin/dev_epidemic_situation' into dev

dev
jianjun 3 years ago
parent
commit
9d645a1461
  1. 2
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java

2
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/ExcelUtils.java

@ -86,7 +86,7 @@ public class ExcelUtils {
public static ServletOutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws IOException { public static ServletOutputStream getOutputStreamForExcel(String fileName, HttpServletResponse response) throws IOException {
fileName = URLEncoder.encode(fileName, "UTF-8"); fileName = URLEncoder.encode(fileName, "UTF-8");
if (!fileName.endsWith(".xls") ||!fileName.endsWith(".xlsx")){ if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")){
fileName = fileName + ".xlsx"; fileName = fileName + ".xlsx";
} }
response.setContentType("application/vnd.ms-excel"); response.setContentType("application/vnd.ms-excel");

Loading…
Cancel
Save