Browse Source

mingzi bug

dev
jianjun 3 years ago
parent
commit
670f5ba7d1
  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 {
fileName = URLEncoder.encode(fileName, "UTF-8");
if (!fileName.endsWith(".xls") ||!fileName.endsWith(".xlsx")){
if (!fileName.endsWith(".xls") && !fileName.endsWith(".xlsx")){
fileName = fileName + ".xlsx";
}
response.setContentType("application/vnd.ms-excel");

Loading…
Cancel
Save