This project has moved and is read-only. For the latest updates, please go here.

Reading cell that calls VBA function returns wrong result

Jan 17 at 6:27 AM
I have a XLSM file that I am trying to read into a database. One of the cells calls a VBA function and returns a price. The VBA function is complex and actually calls another function to help calculate the price. The spreadsheet shows the correct price, but when I try to read the cell with EPPlus it does not return the same value.

I use the following to read the cell:
object c51 = currentWorksheet.Cells[3, 51].Value;

I also tried running the calculate method before reading the cell, but that made the value return as #Name.
currentWorksheet.Cells[3, 51].Calculate();
object c51 = currentWorksheet.Cells[3, 51].Value;

When using the FormulaParserManager logging method, it returns the following:
Timestamp: 1/16/2017 3:53:15 PM
Worksheet: Data
Address: BJ3
'GetDensityFactor' is not a supported function

Is there a way to read a cell whose value is derived from a VBA function?