Copying sheets between workbooks causes issues when textjoin is used in a formula

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.

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-59942

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.

@ryanmcarthur,

This is to inform you that your issue (Ticket ID: “CELLSNET-59942”) has been resolved. The fix/enhancement will be included in our upcoming release Aspose.Cells v26.4, which will be published in the first half of April 2026. You will be notified once the new version is available.

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