| | |
| | | |
| | | //获取模板(带公式的模板需要文件编辑之后才会显示正常数据) |
| | | InputStream inputStream = ExcelUtil.class.getClassLoader().getResourceAsStream("excel/xlsx/totalTemplateNoFormula.xlsx"); |
| | | String time = new SimpleDateFormat("yyyy-MM-dd HH").format(new Date()); |
| | | String fileName = time+ "时报汛统计.xlsx"; |
| | | String time = new SimpleDateFormat("yyyy日MM月dd日HH时").format(new Date()); |
| | | String fileName = time+ "报汛统计.xlsx"; |
| | | // String fileName = StringUtil.format("水库超汛限水位情况计表({}).xlsx",tm); |
| | | ExcelWriter excelWriter = EasyExcel.write(getOutputStream(fileName, response)).withTemplate(inputStream).excelType(ExcelTypeEnum.XLSX).build(); |
| | | //设置公式生效 |