Loading

【Apache POI】将html代码渲染到word中

引入依赖

<dependency>
    <groupId>org.jsoup</groupId>
    <artifactId>jsoup</artifactId>
    <version>1.15.3</version>
</dependency>
<dependency>
    <groupId>io.github.draco1023</groupId>
    <artifactId>poi-tl-ext</artifactId>
    <version>0.4.3</version>
</dependency>

代码实现

HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
Configure.builder().bind("word中需要回填的参数名", htmlRenderPolicy);
posted @ 2023-07-06 18:17  IamHzc  阅读(928)  评论(0编辑  收藏  举报