I using Spire.XLS 10.3.8.
Copying a sheet containing a series of formulas and adding row to the copied sheet will throwing in NullReferenceException.
I run the following code using 'src.xltx'.
- Code: Select all
using (var workbook = new Workbook())
{
workbook.LoadTemplateFromFile("src.xltx");
var sheet = workbook.Worksheets["Sheet1"];
var copiedSheet = workbook.Worksheets.AddCopy(sheet);
copiedSheet.InsertRow(1, 1);
}
Is there a solution for this problem?
Thanks in advance.