I want to convert some spreadsheets which contain references to a plugin-defined function which we are trying to remove. There is a method to convert this which works in VBA by using SUMIFS and generating a table
I am at the step where I have parsed the formulas and extracted the parameters used for the function (done by bracket counting). I have hit a snag. How do I get NPOI/POI Apache to evaluate the things. It seems to demand everything be done inside a cell. This isn't possible in this scenario (since these are parameters not cell formulas, so they don't have a cell in which to evaluate them).
There is the OperandResolver class which seems to be along the right lines, but it wants a ValueEval type as its input which I can't figure out at all. Currently I can only get the parameters as strings. Like "A1", "0.9", "SomeOtherFunction(...)" etc. Those are what I have.
Basically I need something like
pseudocode:
var result = Evaluate_Formula_String(string formula, var Contextual_Information_eg_current_Worksheet)
Where the result would contain either a string or something easily converted into a string.