Class FunctionRepository
- Namespace
- OfficeOpenXml.FormulaParsing.Excel.Functions
- Assembly
- EPPlus.dll
This class provides methods for accessing/modifying VBA Functions.
public class FunctionRepository : IFunctionNameProvider
- Inheritance
-
FunctionRepository
- Implements
- Inherited Members
Properties
FunctionNames
Returns the names of all implemented functions.
public IEnumerable<string> FunctionNames { get; }
Property Value
NamespaceFunctions
Contains all functions that needs a namespace prefix in Excel. For example: The Filter function must have the prefix "_xlfn._xlws."
public Dictionary<string, string> NamespaceFunctions { get; }
Property Value
Methods
AddOrReplaceFunction(string, ExcelFunction)
Adds or replaces a function.
public void AddOrReplaceFunction(string functionName, ExcelFunction functionImpl)
Parameters
functionNamestringCase-insensitive name of the function that should be added or replaced.
functionImplExcelFunctionAn implementation of an ExcelFunction.
Clear()
Removes all functions from the repository
public virtual void Clear()
Create()
Create repository
public static FunctionRepository Create()
Returns
GetFunction(string)
Get function
public virtual ExcelFunction GetFunction(string name)
Parameters
namestring
Returns
IsFunctionName(string)
Returns true if the the supplied name exists in the repository.
public bool IsFunctionName(string name)
Parameters
namestring
Returns
LoadModule(IFunctionModule)
Loads a module of ExcelFunctions to the function repository.
public virtual void LoadModule(IFunctionModule module)
Parameters
moduleIFunctionModuleA IFunctionModule that can be used for adding functions and custom function compilers.