easyexcel的GitHub地址
easyexcel官方文档
依赖导入
<!--xls(03版本excel)-->
<!-- <dependency>-->
<!-- <groupId>org.apache.poi</groupId>-->
<!-- <artifactId>poi</artifactId>-->
<!-- <version>5.2.2</version>-->
<!-- </dependency>-->
<!--xlsx(07版本excel)-->
<!-- <dependency>-->
<!-- <groupId>org.apache.poi</groupId>-->
<!-- <artifactId>poi-ooxml</artifactId>-->
<!-- <version>5.2.0</version>-->
<!-- </dependency>-->
<!--easyexcel依赖导入,包括以上两个poi依赖,防止冲突去掉-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
</dependency>
这里本来准备写个demo,但是官方文档里的demo写的非常详细简单易懂,建议参考官方文档