excel-plus
excel-plus copied to clipboard
使用模板导出,内容写入有问题,没有填充模板而是新建sheet写入了
如题。
Writer.create()
.headerStyle((wb, style) -> {
Font font = wb.createFont();
font.setFontHeightInPoints((short) 20);
font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex());
style.setFont(font);
})
.withTemplate(classPath + File.separator + "template" + File.separator + "stat_channel_template_ceping.xlsx")
.withRows(pageList.getList().stream().map(v -> {
StatChannelExportVo exportVo = new StatChannelExportVo();
exportVo.patch(v);
return exportVo;
}).collect(Collectors.toList()))
.to(ResponseWrapper.create(response, fileName+".xlsx"));
模板导入的模板长什么样啊