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