Hello! Please advise... The following code:
if (formula != null)
{
worksheet.Unprotect("2424");
worksheet.EnableSheetCalculations();
Console.WriteLine("formula:{0} GetFormulaNumberValue:{1} CalculatedValue:{2}",
worksheet.GetFormula(row, colIndex, false),
worksheet.GetFormulaNumberValue(row, colIndex),
worksheet.Range[row, colIndex].CalculatedValue);
worksheet.DisableSheetCalculations();
}
Yields this output: formula:=SUM(D8-F8) + G8 GetFormulaNumberValue:0 CalculatedValue:#NAME?
The actual value (in the Excel sheet) = 11, as per: D8=12, F8=1 and G8=0
Thank You!