本篇文章主要介绍,如何使用Apache POI组件生成柱状图导出到word文档中,具体步骤看下文。
一、实现效果
Java使用POI技术生成柱状图导出到word文档中,最终生成的柱状图如下所示:
二、环境准备
- 编程语言:Java
- 第三方依赖:Apache POI
Apache POI依赖代码如下所示:
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>po