阅读使用POI一系列excel表数据 [英] Reading a range of excel sheet data using POI

查看:116
本文介绍了阅读使用POI一系列excel表数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做的范围内,在读取数据的一些POC从Excel文件到一个数组中爪哇singleshot。

I am doing some POC on reading data within a range from an excel file to an array in Java in singleshot.

我在使用POI在Java中,其中没有读取Excel文件:行会附近1,00,000和无:列将接近240大部分是我从网上找来的例子讲述使用rowIterator和cellIterator获得此完成工作。但由于行数和列数是巨大的,通过每个细胞迭代和添加数据到一个数组是不是一个可行的解决方案。

I have to read an excel file using POI in Java where the no: of rows will be near to 1,00,000 and the no: of columns will be near to 240. Most of the examples which I got from internet tells about using rowIterator and cellIterator for getting this job done. But since the rowcount and columncount is huge, iterating through each cell and adding data to an array is not a feasible solution.

有没有POI API的任何方法,将一次性取单元格区域,它在Java转移到阵列?

Is there any method in POI API which will fetch a range of cells in one shot and transfer it to an array in java?

我仍然可以通过POI API去,但没有成功找到解决办法至今。如果有人知道这样的方法,你可以用小的工作例子来说明吗?

I am still going through the POI API, but was not successful in finding a solution till now. If someone knows about such a method, can you illustrate it with a small working example?

推荐答案

CellWalk 可能的帮助。看到 http://poi.apache.org/ apidocs /组织/阿帕奇/ POI / SS / UTIL / cellwalk / CellWalk.html

您可以在这里找到一个示例使用:<一href=\"http://svn.apache.org/repos/asf/poi/trunk/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java\" rel=\"nofollow\">http://svn.apache.org/repos/asf/poi/trunk/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java

You can find a sample use here: http://svn.apache.org/repos/asf/poi/trunk/src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java

这篇关于阅读使用POI一系列excel表数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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