Posted 3 February 2024, 9:17 am EST
CustomFunction works nice! Except the InsertFunction dialog crashed if the IIntelliSenseFunction interface was used.
public class MhCompound: Function, IIntelliSenseFunction
....
spread.AddCustomFunction(new MhCompound(spread));
Click in InsertFunction dialog on MH.Compound, causes exception
I think it is because formulaEngine.GetFunction does not return custom functions:
var formulaEngine = ((WorkbookBase)spread.AsWorkbook()).FormulaEngine;
var cmd = formulaEngine.GetFunction("MH.Compound")