Insert row wrongly splits rows group [OP-8786]



if InserRow or InserRows is called on an empty row that is part of a rows group, the group is wronly splitted in two different groups.

To reproduce the issue you can start from the attached console program that opens the example file “input.xlsx”, inserts some new rows and then saves the result into the file “output.xlsx”.

Thank you!



Thanks for the sample project and template file.

I noticed the behavior/issue using your sample code with your template file, It looks like for grouped rows/cols dataset, it behaves a little different while inserting new rows to it. You may easily cope with it by using the previous row (rowindex - 1) if this is the ending row in the group.
You may change the line of code:
workbook.Worksheets[0].Cells.InsertRows(2, 8);
workbook.Worksheets[0].Cells.InsertRows(1, 8);

Hope, this helps a bit.


Thanks. As mentioned in the description, as workaround I can also add a content (also a white space) in a cell of the row used as base row for the insert, however both workarounds are not always possible on real scenarios that I am working on.



Thanks for sharing your concerns.

As we already reproduced the issue, so I have logged a ticket with an id “CELLSNET-46855” for your issue. The issue is logged as following:
CELLSNET-46855 - InsertRows wrongly splits grouped rows

We will look into it to figure it out soon.

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



This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-46855”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.


Please try our latest version/fix: Aspose.Cells for .NET v19.7.7:

Aspose.Cells19.7.7 For .Net4.0.Zip (4.9 MB)
Aspose.Cells19.7.7 For .Net2_AuthenticodeSigned.Zip (4.9 MB)

Your issue should be fixed in it.

Let us know your feedback.


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


Thank you! I’m going to try the new release as soon as possible.



Please take your time to evaluate the new version/fix. Hopefully it will pass your test cases.