This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Trouble with Apache POI grouping rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Trouble with Apache POI grouping rows" Watch "Trouble with Apache POI grouping rows" New topic

Trouble with Apache POI grouping rows

M Burke
Ranch Hand

Joined: Jun 25, 2004
Posts: 395
I am using it to generate a Excel spreadsheet. And one feature is to expand\contract rows as groups. The trouble is: I have one overall level, then I want multiple level 2 levels that group the rows. I can't seem to get the numaric combination right. I end up with a single level two grouping that expands between 1 to 10.

hssfSheet.groupRow(1, 20);//level 1
hssfSheet.groupRow(1, 7);//level 2
hssfSheet.groupRow(8, 10);//level 2

This is what I am trying to achieve; two row groups, 1 to 7 and 8 to 10, both at level 2.
1| | 1
| |
| |
| |
| |
| |
| |7(-)
| |8
| |
| |10(-)
It is sorta covered in the JavaRanch Style Guide.
subject: Trouble with Apache POI grouping rows
It's not a secret anymore!