Hi,
I have a scenario where deleting rows or sheets in a workbook after copying sheets from a different workbook will error if both workbooks contain textjoin functions used in cell formula. This appears to have been working at least between 24.7 and 25.8, and is not working from 25.9 onwards.
The simplest code replication I can identify is as follows:
// set license - snipped
var wb1 = new Aspose.Cells.Workbook();
wb1.Worksheets.First().Cells[0, 0].Formula = "=TEXTJOIN(\",\", TRUE, \"ONE\",\"TWO\")";
var wb2 = new Aspose.Cells.Workbook();
wb2.Worksheets.First().Cells[0, 0].Formula = "=TEXTJOIN(\",\", TRUE, \"ONE\",\"TWO\")";
//at this point, both workbooks have a worksheet that contains a textjoin, with established xlfn ranges
var ws = wb2.Worksheets[wb2.Worksheets.Add()];
ws.Copy(wb1.Worksheets.First());
var ws2 = wb2.Worksheets[wb2.Worksheets.AddCopy(ws.Name)];
Assert.IsFalse(wb1.HasCustomFunction);
Assert.IsFalse(wb2.HasCustomFunction); //throws exception.
ws2.Cells.DeleteRows(0, 1, true); //throws exception
wb2.Worksheets.RemoveAt(wb2.Worksheets.First().Name); //throws exception
The stacktrace varies depending on whether accessing HasCustomFunction or calling DeleteRows/Worksheets.RemoveAt, but it’s consistently a “System.ArgumentNullException : Value cannot be null.
Parameter name: value” exception.
Thanks in advance, let me know if you need further details.