I need to get the value (the result of a huge formula) of a worksheet cell, that is being normally displayed when I open the file with Excel.
My code is retrieving correctly the value of 99% of all cells in my worksheets. But not for about 40 of them.
Here is my code:
string fileName = "C:\\Folder1\\template.xlsx";
var workbook = new XLWorkbook(fileName);
var ws = workbook.Worksheet("Formula");
IXLCell cell = ws.Cell("J70");
Console.WriteLine(cell.Value);
Here is the error:
Exception thrown: 'System.NullReferenceException' in ClosedXML.dll
An unhandled exception of type 'System.NullReferenceException' ocurred in ClosedXML.dll
Object reference not set to an instance of an object
After reading the ClosedXML Documentation on github, the only suspicion I have is that my formula is not supported, but the documentation shows the functions in use are. What am I missing?