This code works perfectly, except when the moved rows contain formulas. It seems that the cell references in these formulas are not being preserved, but rather, they are being offset.
For example, a sheet like this
row1: 123
row2: =A1
The above code is called with srcPos=1, count=1, dstPos=3, result is:
row1: 123
row2:
row3: =A2
The formula references another cell after moving down.
My expected result is ( same with performing equivalent operation in Microsoft Excel):
row1: 123
row2:
row3: =A1
Is this a bug, or are there other more suitable APIs to achieve my goal?
@Jason_Wang
Test by creating sample file and using the latest version Aspose.Cells for. NET v23.11. We can obtain the correct results. Please refer to the attachment (12.4 KB).
The sample code as follows:
I upgraded to 23.11, and the results completely met my expectations. Additionally, a similar bug that I hadn’t had a chance to describe was also fixed. Thank you very much for your response.
It seems like I accidentally deleted my previous reply, so I’m repeating it now.