Table of Contents

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

IEnumerable<string>

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

Dictionary<string, string>

Methods

AddOrReplaceFunction(string, ExcelFunction)

Adds or replaces a function.

public void AddOrReplaceFunction(string functionName, ExcelFunction functionImpl)

Parameters

functionName string

Case-insensitive name of the function that should be added or replaced.

functionImpl ExcelFunction

An implementation of an ExcelFunction.

Clear()

Removes all functions from the repository

public virtual void Clear()

Create()

Create repository

public static FunctionRepository Create()

Returns

FunctionRepository

GetFunction(string)

Get function

public virtual ExcelFunction GetFunction(string name)

Parameters

name string

Returns

ExcelFunction

IsFunctionName(string)

Returns true if the the supplied name exists in the repository.

public bool IsFunctionName(string name)

Parameters

name string

Returns

bool

LoadModule(IFunctionModule)

Loads a module of ExcelFunctions to the function repository.

public virtual void LoadModule(IFunctionModule module)

Parameters

module IFunctionModule

A IFunctionModule that can be used for adding functions and custom function compilers.