How to add custom worksheet functions

If you want to add your custom functions, you should subclass CGXWorksheetFunctions (or CGXDefaultWorksheetFunctions) and override LookupFunction. See the class reference for the class CGXWorksheetFunctions for more details.

Please note that implementing your own custom worksheet functions is only recommended for advanced users. When implementing your own custom worksheet functions you will have to deal directly with the formula engine code. There is no documentation for the formula engine internal functions. Take a look at the existing worksheet functions (e.g. in src\engine\fnmath.cpp) for examples how to implement worksheet functions.