This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Other Open Source Projects and the fly likes POI 3.6 XSSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "POI 3.6 XSSF" Watch "POI 3.6 XSSF" New topic
Author

POI 3.6 XSSF

R Dom
Greenhorn

Joined: Sep 08, 2010
Posts: 19
Can anyone tell me how can i read the xlsx workbook by using row by column method?

How can i find total number of columns and rows in the excel sheet using xssf.


Cheers,
RD
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Start here: http://poi.apache.org/spreadsheet/quick-guide.html#Iterator


Ping & DNS - my free Android networking tools app
R Dom
Greenhorn

Joined: Sep 08, 2010
Posts: 19
Thanks mate. I was looking for Java 1.5 for each loop to simplify the things.
But I think we still cant access a particular cell identified by its row number and column number?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Sure you can: Sheet.getRow(int).getCell(int)
R Dom
Greenhorn

Joined: Sep 08, 2010
Posts: 19
i want something like sheet.get(row number , column number) ... not cell number.
Also can we find out number of columns in excel sheet?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
There's no such thing as a "cell number" - the parameter to getCell *is* the column number. I don't see a difference between chaining two method calls with one parameter each, and one method call with two parameters. If for some reason you want that you can always write your own convenience method.
 
Don't get me started about those stupid light bulbs.
 
subject: POI 3.6 XSSF