easyexcel和easypoi冲突解决办法

easyexcel和easypoi冲突

问题: 项目中需要用到easyexcel的读写, 同时也需要使用easypoi的复杂Excel操作,使用原pom文件的内容,会导致Excel读取文件报错.

原pom文件

	<dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>easyexcel</artifactId>
        <version>2.2.0-beta1</version>
    </dependency>
	<dependency>
        <groupId>cn.afterturn</groupId>
        <artifactId>easypoi-base</artifactId>
        <version>3.2.0</version>
    </dependency>

1: 尝试在easyexcel 引入增加exclusions ,排除poipoi-ooxmlpoi-ooxml-schemas
easyExcel 同样不能正常读写Excel文件
2: 尝试在easypoi引入增加exclusions ,排除poipoi-ooxmlpoi-ooxml-schemas
easypoi 相关接口无法正常使用
3: 尝试在easyexcel easypoi引入增加exclusions ,排除poipoi-ooxmlpoi-ooxml-schemas, 同时将poi单独引入pom文件
easypoi 相关接口无法正常使用,easyExcel 同样不能正常读写Excel文件
4: 升级版本后,解决问题.
easypoi 版本升级为 4.1.3 , 如果无法兼容, 再使用 exclusions 处理一下 poi
改动后pom文件

	<dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>easyexcel</artifactId>
        <version>2.2.0-beta1</version>
    </dependency>
	<dependency>
        <groupId>cn.afterturn</groupId>
        <artifactId>easypoi-base</artifactId>
        <version>4.1.3</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml-schemas</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

整理不易, 点个赞吧 ☺

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

message丶小和尚

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值