This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading rows based on column value in POI  RSS feed

 
Rohan Ramakumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement where I have to read the contents of rows in a specific order. This order is based on the value of a particular column.

For instance I have a sheet as follows :
Col1Col2Col3
A........
Mgmnt........
Inst........


Now I want to read the rows in the following order :

First read the row where Col1 value is "Mgmnt", next row with Col1="A" and then finally row with Col1="Inst".

Is there a way to read the rows in this order using POI ?

Thanks
 
fred rosenberger
lowercase baba
Bartender
Posts: 12542
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do they have to be read in that order? Could you read them in their 'natural' order, save each row off to a variable (or into a map), then process them in the order you need?
 
Rohan Ramakumar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fred,

Thats how I'm doing it right now but I wanted to know if there is a simpler method using the POI API itself.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!