且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

有没有什么办法打开Android中的XLS表?

更新时间:2023-11-07 23:16:22

有两种流行的库来读写Excel文件与Java(等等,与Android)的的Apache POI JExcelApi的

There are two popular libraries to read and write Excel files with Java (and so, with Android): Apache POI and JExcelAPI.

的Apache POI是积极维护(截至2014年),JExcelApi的看起来像它不是正在积极发展。 ApachePOI可以读取的.xlsx文件,这JExcelApi的不行,这可能是很多用户非常重要的。

Apache POI is actively maintained (as of 2014), JExcelAPI looks like its not under active development. ApachePOI can read .xlsx files which JExcelAPI cannot, which may be important for a lot of users.

我最喜欢的关于Apache POI是其基于事件的解析模式,阅读大量的Excel工作表时,它有一个非常低的内存配置文件。这是我在Android这样的移动设备上特别有用。根据我的经验,加载一个简单的Excel文件与2张,几百行和一些公式与JExcelApi的超过了Dalvik虚拟机的内存限制(OutOfMemoryException异常)上月中低端设备(1GB RAM总量或更少)。

What I like the most about Apache POI is its event-based Parsing model, which has a very low memory profile when reading large Excel sheets. This i especially useful on mobile devices like Android. In my experience, loading a simple Excel file with 2 sheets, a few hundred row and some formulas with JExcelAPI exceeded the memory limit (OutOfMemoryException) of the Dalvik VM on mid to low-end devices (1GB total RAM or less).