Thanks for your posting and using Aspose.Cells.
We have tested your code with the latest version: Aspose.Cells for .NET v22.214.171.124 and found exception does not occur, however GetRangeByName returns null after copying sheet.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-44306 - GetRangeByName returns null after copying sheet
var before = workbook.Worksheets.GetRangeByName(“test1”);
//Returns null which is wrong
var after = workbook.Worksheets.GetRangeByName(“test1”);
Thanks for using Aspose.Cells.
Please download and try the latest fix: Aspose.Cells for .NET v126.96.36.199 and let us know your feedback.