liaochong / myexcel

MyExcel, a new way to operate excel!
https://github.com/liaochong/myexcel/wiki
Apache License 2.0
1.66k stars 325 forks source link

Freemarker导出的时候excel样式没生效 #407

Closed wpzym1125 closed 11 months ago

wpzym1125 commented 11 months ago

您好,
ExcelBuilder excelBuilder = new FreemarkerExcelBuilder(); Workbook workbook = excelBuilder.classpathTemplate("/templates/importUserExcelTemplate.ftl").workbookType(WorkbookType.XLSX).applyDefaultStyle() .build(dataMap); 1702281315540 导出的excel里面没有背景色

是我参数设置的不对么?麻烦看下,谢谢

liaochong commented 11 months ago

4.4.0版本测试正常

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: 王培 @.> 发送时间: 2023年12月11日 15:56 收件人: liaochong/myexcel @.> 抄送: Subscribed @.***> 主题: Re: [liaochong/myexcel] Freemarker导出的时候excel样式没生效 (Issue #407)

您好, ExcelBuilder excelBuilder = new FreemarkerExcelBuilder(); Workbook workbook = excelBuilder.classpathTemplate("/templates/importUserExcelTemplate.ftl").workbookType(WorkbookType.XLSX).applyDefaultStyle() .build(dataMap); 1702281315540.png (view on web) 导出的excel里面没有背景色

是我参数设置的不对么?麻烦看下,谢谢

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

wpzym1125 commented 11 months ago

我删除了applyDefaultStyle 但是我设置了1个背景色,文字就没有垂直居中了,这个是什么样式设置的? 1702282183392

wpzym1125 commented 11 months ago
导出的时候还是没边框的,是这个样式不支持么?还是我哪里写错了呀
wpzym1125 commented 11 months ago
wpzym1125 commented 11 months ago

1702283972392

liaochong commented 11 months ago

请参考 https://github.com/liaochong/myexcel/wiki/Style-support

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: 王培 @.> 发送时间: 2023年12月11日 16:39 收件人: liaochong/myexcel @.> 抄送: 清沐 @.>, Comment @.> 主题: Re: [liaochong/myexcel] Freemarker导出的时候excel样式没生效 (Issue #407)

1702283972392.png (view on web)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

wpzym1125 commented 11 months ago

可以了,谢谢