qin 1 yıl önce
ebeveyn
işleme
a2f777ccaa

+ 2 - 2
src/main/java/com/poteviohealth/cgp/statistics/utils/ExcelUtils2.java

@@ -43,10 +43,10 @@ public class ExcelUtils2 implements ResourceLoaderAware {
                                     HttpServletResponse resp) {
 
         Resource template = resourceLoader.getResource(templateLoacation);
-        resp.setHeader("Content-Type", "application/vnd.ms-excel; charset=utf-8");
+        resp.setHeader("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8");
         try {
             resp.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(filename, "UTF-8"));
-            logger.info("文件大小2:" + template.contentLength());
+            resp.setHeader("Content-Length", String.valueOf(template.contentLength()));
         } catch (Exception e) {
             throw new RuntimeException(e);
         }