I have a test case using this Excel workbook. Test.zip (11.7 KB)
If you run the code below against the
Test.xlsx file in my attachment, the value of cell F3 as printed to console is “50”.
However, if you uncomment the 2nd line
//workbook.Settings.CreateCalcChain = true; and run the same code again, the output value for cell F3 is “24”.
If you can please have a look at this issue that would be great. Thanks.
var workbook = new Workbook("Test.xlsx"); //workbook.Settings.CreateCalcChain = true; workbook.CalculateFormula(); Worksheet wksheet = workbook.Worksheets["Sheet1"]; Cell q2 = wksheet.Cells["Q2"]; q2.PutValue(3); // Calculate formula again. workbook.CalculateFormula(); Cell f3 = wksheet.Cells["F3"]; Console.WriteLine(f3.ToString());