哪个是更好的开放源码Excel文件在Java中解析? [英] Which is better open source for Excel file parsing in Java?

查看:173
本文介绍了哪个是更好的开放源码Excel文件在Java中解析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是为Excel使用Java的Apache POI或JExcel API解析更好的API?
在速度,内存使用率和code稳定性方面。

Which is better API for excel parsing in Java Apache POI or JExcel API? In terms of speed, memory utilization and code stability.

推荐答案

我个人建议在POI JExcel。我选择了POI JExcelApi的原因是:

Personally I would recommend POI over JExcel. The reasons I chose POI over JExcelAPI are:


  1. POI同时支持新旧和MS Excel工作表格式

  2. 它有一个更简洁的API(恕我直言)

  3. 据我可以看到它不会从JExcelApi的具有刺激性日期\\时间问题的影响(日期显示)。

  1. POI supports both old and new MS Excel sheet formats
  2. It has a cleaner API (imho)
  3. As far as I can see it does not suffer from the irritating Date\Time issues that JexcelApi has (Date display).

我不得不同时使用的机会。 POI,在我看来,有一个非常深思熟虑和易于使用的API。从我的角度来看,最大的好处是,你可以关闭工厂的创建工作表实例,然后在界面的usermodel的来龙去脉处理。这意味着你的code可以处理新旧Excel文件格式,而无需担心哪个是哪个。

I have had the opportunity to use both. POI, in my opinion, has a really well thought out and easy to use API. The biggest benefit from my perspective is that you can factory off the creation of the worksheet instance and then deal with everything in the context of the usermodel interfaces. This means your code can process both old and new Excel file formats without having to worry about which is which.

此外,您可以读取和写入同一工作表实例。随着JExcelApi的有可读性的床单和我发现奇怪的可写表之间的这种很奇怪的分裂。这也导致了我要介绍凌乱变通从我的code读向写之举。

Additionally, you are able to read and write the same Worksheet instance. With JExcelApi there is this really strange split between "readable" sheets and "writable" sheets which I found odd. This also resulted in me having to introduce messy work arounds to move from "reading" to "writing" in my code.

我没有使用旧,二进制文件(POI HSSF)和JExcelApi的POI发现有意义的性能差异。然而有POI HSSF(旧格式)及POI XSSF(新格式)之间有显著的性能差异。我想这是因为所有的拆包和parseing XML所需的额外的工作。

I did not notice meaningful performance difference using POI on old, binary files (POI HSSF) and JExcelApi. There is however a significant performance difference between POI HSSF (old format) and POI XSSF (new format). I assume this is because of all the extra work required for unpacking and parseing XML.

这篇关于哪个是更好的开放源码Excel文件在Java中解析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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