Browse Source

[fix]

工具类 导出工具
修改导出时生成文件名为手动设置的工作表名;
dev
王晓迪 4 months ago
parent
commit
cf664b0440
  1. 3
      ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

3
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@ -382,7 +382,8 @@ public class ExcelUtil<T>
addStatisticsRow(); addStatisticsRow();
} }
} }
String filename = encodingFilename(sheetName); // String filename = encodingFilename(sheetName);
String filename = sheetName + ".xlsx";
out = new FileOutputStream(getAbsoluteFile(filename)); out = new FileOutputStream(getAbsoluteFile(filename));
wb.write(out); wb.write(out);
return AjaxResult.success(filename); return AjaxResult.success(filename);

Loading…
Cancel
Save