Collapse and Expand multi level groups

@tidav02,

Please notice, I am able to reproduce the issue as you mentioned by using your template file and sample code. I found the issue as following:

Sheet1: Saved in excel with simple group rows/columns collapsed, then expand the group with Aspose.Cells. The sheets seems in a corrupted state, it shows the minus icon while still collapsed

I have logged a ticket with an id “CELLSNET-50224” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

The issues you have found earlier (filed as CELLSNET-50038,CELLSNET-50065) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao

@tidav02,

We evaluated your issue “CELLSNET-50224” further. We found this is not an issue of Aspose.Cells. The first visible cell is U37 in the template fie, so you can not see those grouped detail. Please set the first visible cell after showing grouped detail as the following codes:
e.g.
Sample code:

.....
worksheet.Cells.ShowGroupDetail(false, 4);
worksheet.Cells.ShowGroupDetail(true, 4);
worksheet.FirstVisibleRow = worksheet.FirstVisibleColumn = 0; 

Let us know if you still find the issue.

Hello @Amjad_Sahi,

Thank you for the answer. Your workaround seems to work, but it feels to me it is a workaround.

I’m not sure I understand why we would need to programmatically set the first visible row/column to 0.

In what situation do we not want to display the group detail when we call ShowGroupDetail?

Correct me if I’m wrong but,

ShowGroupDetail(true, X) should call FirstVisibleColumn = 0

and

ShowGroupDetail(false, X) should call FirstVisibleRow = 0

or am I missing something?

Thanks!

@kirederf81,

Good to know that it sorts out your issue now.

We will provide details on it soon.

@Amjad_Sahi

Hello,

The line provided works for our sample code but we have an other use case where we just load a sheet with collapsed groups and still have the issue, we are not collapsing / expanding groups at that time.

I don’t see how i can reproduce this case with a sample code :frowning:

Would be nice if you have any idea, thanks!

I am afraid, without simulation code and sample files, we cannot help you much. By the way, on a safer side, you may embed the line of code to your code if it makes any difference.
worksheet.FirstVisibleRow = worksheet.FirstVisibleColumn = 0;

Hello,

We updated our app with version 12.1 ans still got an issue with the columns.

Please check this post: Error after loading column group | SpreadJS | SpreadJS | GrapeCity Forums

Apparently the file saved with aspose saved the group in a bad state.

Thanks

@tidav02,

Please create a sample console demo application (runnable) using Aspose.Cells APIs only, zip the project and post us here to reproduce the issue on our end, we will check it soon. Also, attach the sample Excel files (input file and output file, etc.).

PS. please exclude Aspose.Cells.Dll from the zipped archive to minimize the size of the attachment.

@Amjad_Sahi,

Here is a sample project.AsposeGrouping.zip (5.8 MB)

I found the issue by looking at the XML of the generated Excel File.

In the example, I have 1 sheet which has a group on columns DEF. Via the code, I collapse the group and expand it. Then I save the workbook to disk.

If I open the XML of that file, I see the following XML for columns

<cols>
	<col min="4" max="6" width="9.142857142857142" customWidth="1" outlineLevel="1"/>
	<col min="7" max="7" width="9.142857142857142" collapsed="1"/>
</cols>

Column 7 has the attribute collapsed even if the group is expanded.

The same Excel file which was never manipulated with Aspose has the following XML for columns

<cols>
	<col min="4" max="6" width="9.140625" outlineLevel="1"/>
</cols>

Let me know if you have everything needed to replicate the issue.

Thanks

@kirederf81,

Thanks for the sample project.

We will be looking into your issue and get back to you soon.

@kirederf81,

Please notice, I am able to reproduce the issue as you mentioned by using sample file(s) and code. I found when doing Collapse and Expand multi level groups, there are some differences in the sheet’s XML in the output file generated by MS Excel and Aspose.Cells. I have logged a separate ticket with an id “CELLSNET-50341” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@kirederf81
Please try the lastese version 22.2.Support Finnish Language in Spreadsheet API for C# .NET Apps

Hi,

The version 22.2 fix our issue.

Thanks!

@tidav02,

Thanks for your feedback.

Good to know that your issue is sorted out by the new version/fix.

The issues you have found earlier (filed as CELLSNET-50341) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi