poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lucas <lucasd2...@gmail.com>
Subject Java POI HSSF issue with Excel Outline and Expand/Collapse
Date Thu, 30 Apr 2009 02:34:27 GMT
Hi All,

I'm running into an issue with Excel Outlining using POI HSSF. I create
three groups with "Test1" being the root node. I collapse each group as well
using setRowGroupCollapsed. However, when I expand the first node on the
Excel File generated, all the other nodes are also expanded. Is there a
setting to prevent this? I would like to have all levels collapsed and if I
expand the first level, the lower levels should remain collapsed until I
expand them. Below is my test code and any help is greatly appreciated.
Thanks in advance
sheet.setAlternativeExpression(false);
sheet.setRowSumsBelow(false);

Row excelRow = null;
Cell excelCell = null;

excelRow = sheet.createRow( 0 );
excelCell = excelRow.createCell( 0 );
excelCell.setCellValue( "Test 1" );

excelRow = sheet.createRow( 1 );
excelCell = excelRow.createCell( 1 );
excelCell.setCellValue( "Test 2" );

excelRow = sheet.createRow( 2 );
excelCell = excelRow.createCell( 2 );
excelCell.setCellValue( "Test 3" );

excelRow = sheet.createRow( 3 );
excelCell = excelRow.createCell( 3 );
excelCell.setCellValue( "Test 4" );

sheet.groupRow( 1, 3 );
sheet.groupRow( 2, 3 );
sheet.groupRow( 3, 3 );

sheet.setRowGroupCollapsed( 1, true );
sheet.setRowGroupCollapsed( 2, true );
sheet.setRowGroupCollapsed( 3, true );

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message