|
|
@@ -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);
|
|
|
}
|