https://issues.apache.org/bugzilla/show_bug.cgi?id=54082

          Priority: P2
            Bug ID: 54082
          Assignee: dev@poi.apache.org
           Summary: collapseRow do not works as expected
          Severity: normal
    Classification: Unclassified
          Reporter: michele.cr...@immopac.ch
          Hardware: PC
            Status: NEW
           Version: 3.8
         Component: XSSF
           Product: POI

Created attachment 29536
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29536&action=edit
Output

I have a nested grouping with one parent and two children. 
The first level is expanded. The first child is expanded and the second one
collapsed. I expand/collapse the groups using setRowGroupCollapsed. The problem
is that if I set the second child as NOT expanded, the first one is also closed
(see attachment)




Here the code:


import java.io.FileOutputStream;
import java.io.IOException;

import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;


public class ExcelGroupRowTest {

    /**
     * @param args
     */
    public static void main(String[] args) {
        try{
        Workbook wb = new XSSFWorkbook();
        Sheet sheet = wb.createSheet("Mysheet");
        sheet.groupRow(1, 20);
        sheet.setRowGroupCollapsed(1, false);

        sheet.groupRow(5, 10);
        sheet.setRowGroupCollapsed(5, false);


        sheet.groupRow(12, 14);
        sheet.setRowGroupCollapsed(12, true);

    FileOutputStream fileOut = new FileOutputStream("workbook.xlsx");
            wb.write(fileOut);
            fileOut.close();
        }catch (IOException e){

            e.printStackTrace();
        }

    }

}

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to