Hi, we’re running into an issue where the latest Aspose.Cells for .NET crashes when
Cells.InsertCutCells() is called. Specifically, the crash only occurs in files which contain a formula that intersects 2 ranges.
For example, the formula
=NamedRange1 NamedRange2 returns the intersection of
InsertCutCells() is called on a workbook that contains a range intersection like that, it throws the following exception:
Aspose.Cells.CellsException: 'Invalid reference for sign ’ ‘(Based on cell Sheet1!E2)’
The intersection does not need to be inside the range that is being cut by
InsertCutCells() for this to occur.
var workbook = new Aspose.Cells.Workbook("C:\\scratch\\AsposeIntersectionRepro.xlsx"); var sheet = workbook.Worksheets["Sheet1"]; var range = sheet.Cells.CreateRange("A1"); sheet.Cells.InsertCutCells(range, range.FirstRow + 1, range.FirstColumn + 1, Aspose.Cells.ShiftType.Down);
AsposeIntersectionRepro.zip (6.6 KB)
Version info: I have reproduced this on Aspose.Cells for .NET version 20.5.0 and 19.10.0. I had to do some work to extract the 20.5.0 DLL from your NuGet package, because the 20.5.0 package on NuGet is currently broken for .NET Core as per this issue.