Skip to content

Breaking Changes in EPPlus 7

Mats Alm edited this page Aug 25, 2023 · 14 revisions

Breaking Change From EPPlus 7.0

ExcelFunction class

The formula parser has changed significantly in EPPlus 7, requiring all custom functions that are inherited from the ExcelFunction class to be reviewed. The ExcelFunction class now exposes new properties used to handle array results and condition behaviour.

  • NamespacePrefix - If the function requires a prefix when saved, for example "_xlfn." or "_xlfn._xlws."
  • HasNormalArguments A Boolean indicating if the formula only has normal arguments. If false, the GetParameterInfo method must be implemented. The default is true.
  • ReturnsReference - If true the function can return a reference to a range. Use the CreateAddressResult to return the result with a reference. Returning a reference will cause the dependency chain to check the address and will allow the colon operator to be used with the function.
  • IsVolatile - If the function returns a different result when called with the same parameters. The default is false.
  • ArrayBehaviour - If the function allows arrays as input in a parameter, resulting in an array output. Also see the GetArrayBehaviourConfig method. Methods
  • CreateAddressResult - Returns the result with a reference to a range.
  • CreateDynamicArrayResult - The result should be treated as a dynamic array.
  • GetArrayBehaviourConfig - Sets the index if the parameters that can be arrays. Also see the ArrayBehaviour property.

Other changes

  • The source code tokenizer now tokenizes in more detail, tokenizing addresses.
  • The expression handling is totally rewritten and now uses reversed polish notation instead of an expression tree. This change affects internal classes only.
  • The CompileResult class has moved to a new namespace: OfficeOpenXml.FormulaParsing.FormulaExpressions
  • The FunctionCompilerFactory class has changed visibility from public to internal.

EPPlus wiki

Versions

Worksheet & Ranges

Styling

Import/Export data

Formulas and filters

Charts & Drawing objects

Tables & Pivot Tables

VBA & Protection

Clone this wiki locally