This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android 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: 41178
    
  45
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: 41178
    
  45
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: 41178
    
  45
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.
 
Consider Paul's rocket mass heater.
 
subject: POI 3.6 XSSF
 
Similar Threads
Conditional Formatting in POI
Re:How to get Column count using XSSF POI
Read a .xls,.xlsx file format using XSSF
Converting Old POI Reading .xls Files to POI 3.7 Issues
How to identify the Microsoft office version + POI