How to get calculated value of the Formula cell in Excel spreadsheet in .NET

I have a cell that has a formula but when I try to get the value, it returns null instead of calculated value. What can I do to get the calculated value?

@Lndsdev,
It seems that you are not calling Workbook.CalculateFormula() function before fetching value from the cell. Give a try to the following sample code that demonstrates this scenario.

Workbook workbook = new Workbook();
workbook.Worksheets[0].Cells["A1"].Value = 5;
workbook.Worksheets[0].Cells["A2"].Value = 10;
workbook.Worksheets[0].Cells["A3"].Formula = "=A1+A2";
Console.WriteLine(workbook.Worksheets[0].Cells["A3"].Value);//Here you will get null
workbook.CalculateFormula();//CALL THIS FUNCTION TO GET THE CALCULATED VALUE
Console.WriteLine(workbook.Worksheets[0].Cells["A3"].Value);//Here you will get value

If it does not resolve your issue, share your runnable console application along with the sample Excel file, program output file and expected output file generated by MS Excel. We will reproduce this issue here and share our feedback accordingly.