Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

POI 3.6 XSSF

 
R Dom
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
 
R Dom
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure you can: Sheet.getRow(int).getCell(int)
 
R Dom
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic