ArgumentOutOfRangeException: Index was out of range calling Worksheet Copy

We use Aspose.Cells in a .NET 6 application, and are upgrading cells library from version 19.1.
On some of our data, an operation that was copying a Worksheet from one Workbook to another, ends up throwing index out of range exception.
This regression is observed on versions starting from 22.1.0, including the latest version 24.1.0.

Exception trace looks like this:

   at System.Collections.ArrayList.get_Item(Int32 index)
   at§♣(Int32 ☻)
   at Aspose.Cells.CopyOptions.♠(Int32 ☻, Int32)
   at ↓♣yte[] ☻, Int32, CopyOptions ♣)
   at ↓
t Aspose.Cells.Name.☻(Name ☻, CopyOptions)
   at Aspose.Cells.CopyOptions.♣(Int32 ☻)
   at Aspose.Cells.Worksheet.Copy(Worksheet sourceSheet, CopyOptions copyOptions)

I attach a small application which replicates the issue on a small sample data.
We will appreciate some resolution.
1267922819 Bug Replication.zip (238.1 KB)

@solvexia
By using sample file and code for testing, we can reproduce the issue. Found that ArgumentOutOfRangeException occurred when copying the worksheet.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-54992

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@solvexia,

We are pleased to inform you that your issue has been resolved now. The fix will be included in our upcoming release (Aspose.Cells v24.2) that we plan to release in the first half of February 2024. You will be notified when the next version is released.

Thank you so much, Aspose team! Such timely fix.

@solvexia
You are welcome. If you have any questions, please feel free to contact us.

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