We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Expanding parent in Multi-level row groups should keep underlying groups collapsed

Hi,
I’m trying to generate a report with multi level grouping of rows.

I have generated 1st level group as below:
worksheet.Cells.GroupRows(5, 7, true);
2nd level group is generated as below:
worksheet.Cells.GroupRows(6, 7, true);

If we expand first level group, underlying child group(s) should stay collapsed until we expand them explicitly.

This issue is similar to Collapse and Expand multi level groups

I’m using latest Aspose.Cells 22.3.0 and don’t see the expected behavior.
Is this a bug or do we need any tweaks in our code to get this working?

@sjasthi,

Please share your complete sample code (runnable) with sample Excel files (input file(if any) and output Excel file). Also, provide your expected Excel file (containing grouped rows) that you may manually create in MS Excel. We will check your issue soon.

@sjasthi
1,Please group the inner layer first as the following:
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// 2nd level group is generated as below:
worksheet.Cells.GroupRows(6, 7, true);
// I have generated 1st level group as below:
worksheet.Cells.GroupRows(5,7, true);
workbook.Save(dir + “dest.xlsx”);
2, Aspose.Cells works as MS Excel now.Please check attached dest.zip (6.5 KB)
If the first level is expanded, all are expanded in “Aspose” and “Excel” sheet.
It seems if the end row is same in the different level, MS Excel will expand all.