• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to sort the excel sheet using POI?  RSS feed

 
Chhaya Dhanani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am generating an excel sheet using the POI (HSSF classes) from a text file.
the excel sheet is generated properly.
what i want to know is how can i generate an entire sheet which is sorted based on a particular column.
for example:
S.No Name Area Code
-----------------------
1 ABC South
2 XYZ North
3 PQR East
Th excel is generated fine.
now i want it to be made in the already sorted format as below(based on areacode)
S.No Name Area Code
-----------------------
1 PQR East
2 XYZ North
3 ABC South
Can any one suggest a way to go about doing this.
? are there any classes in HSSF series or POI which can help achieve this?
Quick response will be highly appreciated
Thanx in advance
Chhaya
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!