Border are not getting hidden with grouping and ungrouping

We have an issue where borders are not getting hidden when grouping. There are 2 such scenarios.

UseCase1. This is specifically happening when the cell say C1 has bottom border and the cell below say C2 also has some border. In this case while grouping C1 gets hidden but still showing the bottom border.

UseCase2. When applying left border styling following the application of bottom border styling (as in case 1), collapsing the groups does not hide the border for the cells where additional styling was applied. I think in this case every time a new style object is created.

Attaching the Sample application. The sample application generates 2 Excel files UseCase1 and UseCase2.AsposeBorderWithGroupingIssue.zip (131.5 KB)

@LakshmiAys,

Thanks for the sample code and template file.

After an initial test, I am able to reproduce both issues as you mentioned by using your sample code with your template file. I found borders are not hidden while grouping and ungrouping rows. I have logged a ticket with an id “CELLSNET-46881” for your issue. We will look into it soon.

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

@LakshmiAys,

We evaluated your issue further. Well, it’s not an issue of Aspose.Cells APIs. If you could set the bottom border of the Cell C1 in MS Excel manually, hence the top border of C2 will be updated too. Aspose.Cells works the same way as MS Excel. Please use cell.GetStyle(false) and set Workbook.Settings.UpdateAdjacentCellsBorder as false. We will also use Workbook.Settings.UpdateAdjacentCellsBorder as the default checkBorders of Cell.GetStyle() in the next fix. We will share the fix here once we have performed QA and incorporated other enhancements and fixes.

The issues you have found earlier (filed as CELLSNET-46881) have been fixed in Aspose.Cells for .NET v19.9. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

Thank you. Your previous suggestion for this issue “Please use cell.GetStyle(false) and set Workbook.Settings.UpdateAdjacentCellsBorder as false” also fixed our problem.

@LakshmiAys,

Good to know that your issue is sorted out now. And, yes, you may either use latest version/fix or try the suggested solution (as we mentioned in the previous post). Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.