Hello, This is with POI 3.2 ? I have the same issue. In the class RowRecordsAggregate, method collapseRow, if you add this line : 'rowRecord.setColapsed(true);' , it works better.
Do you open the document with MS Office Excel or Open Office ? -----Message d'origine----- De : David Lucas [mailto:[email protected]] Envoyé : jeudi 30 avril 2009 04:34 À : [email protected] Objet : Java POI HSSF issue with Excel Outline and Expand/Collapse 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 ); Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei die Umwelt zu schuetzen / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
