Apache POI所需的必要Maven依赖关系 [英] Required maven dependencies for Apache POI to work

查看:2950
本文介绍了Apache POI所需的必要Maven依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Apache POI库来解析excel文件(旧版本和较新版本的excel).所以我想知道我需要从Apache POI中包含哪些jar,因为在以下链接中:

I want to use Apache POI library to parse excel files (old versions and newer versions of excel). So I was wondering what jars do i need to include from the Apache POI because in following link:

http://mvnrepository.com/artifact/org.apache.poi

我发现其中包括很多罐子,我需要全部将它们包括在内吗?

I found lots of jars to be included, do I need to include them all?

如果是这样,要包含的最新稳定版本是什么,它可以与Microsoft Office 2010一起使用吗?

If so, what is the latest stable version to be included, and does it work with Microsoft's Office 2010?

推荐答案

不,不必包括所有 POI 的依赖项. Maven的传递依赖机制将解决这一问题. 注意,您只需要表达对适当POI工件的依赖即可.例如:

No, you don't have to include all of POI's dependencies. Maven's transitive dependency mechanism will take care of that. As noted you just have to express a dependency on the appropriate POI artifact. For example:

<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>3.8-beta4</version>
</dependency>

这篇关于Apache POI所需的必要Maven依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆