java解析Excel使用hutool工具类

hutool包,真是好用,方便,强烈推荐…
https://hutool.cn/docs/index.html#/
然后使用Excel的工具类,还需要引入poi-ooxml包版本的话,报错里面有
自己确认一下就好了

 <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.17</version>
        </dependency>

一行代码搞定:常用的就是read方法了.

        ExcelReader reader = ExcelUtil.getReader(FileUtil.file("C:\\Users\\stack\\Desktop\\hanke\\aaa.xlsx"));

在这里插入图片描述

posted @ 2019-05-09 16:47  你就像甜甜的益达  阅读(574)  评论(0编辑  收藏  举报