API Reference

Class

ExcelFormulaSyntaxTree

Namespace OfficeIMO.Excel
Assembly OfficeIMO.Excel
Modifiers sealed

Immutable syntax tree for reference-bearing Excel formula text. It preserves all non-reference tokens verbatim and provides the common rewriter used by public conversion and search APIs.

Inheritance

  • Object
  • ExcelFormulaSyntaxTree

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Methods

public String ConvertReferences(ExcelReferenceStyle outputStyle, Int32 anchorRow = 1, Int32 anchorColumn = 1) #
Returns: String

Converts every parsed reference to A1 or R1C1 notation.

Parameters

outputStyle OfficeIMO.Excel.ExcelReferenceStyle requiredposition: 0
anchorRow System.Int32 = 1 optionalposition: 1
anchorColumn System.Int32 = 1 optionalposition: 2
public static ExcelFormulaSyntaxTree Parse(String formula) #
Returns: ExcelFormulaSyntaxTree

Parses A1 formula references while preserving all other tokens verbatim.

Parameters

formula System.String requiredposition: 0
public String Rewrite(Func<ExcelReference, ExcelReference> rewriter, ExcelReferenceStyle outputStyle = A1, Int32 anchorRow = 1, Int32 anchorColumn = 1) #
Returns: String

Rewrites reference nodes once while preserving literals and all other syntax.

Parameters

rewriter System.Func{OfficeIMO.Excel.ExcelReference,OfficeIMO.Excel.ExcelReference} requiredposition: 0
outputStyle OfficeIMO.Excel.ExcelReferenceStyle = A1 optionalposition: 1
anchorRow System.Int32 = 1 optionalposition: 2
anchorColumn System.Int32 = 1 optionalposition: 3
public String RewriteNames(Func<String, String> rewriter) #
Returns: String

Rewrites defined-name nodes while preserving all other formula syntax.

Parameters

rewriter System.Func{System.String,System.String} requiredposition: 0
public String RewriteStructuredReferences(Func<String, String, String> rewriter) #
Returns: String

Rewrites structured table-reference nodes while preserving all other formula syntax.

Parameters

rewriter System.Func{System.String,System.String,System.String} requiredposition: 0
public String RewriteTableNames(Func<String, String> rewriter) #
Returns: String

Rewrites table identifiers in structured and bare table-reference nodes.

Parameters

rewriter System.Func{System.String,System.String} requiredposition: 0

Properties

public String Text { get; } #

Exact authored formula text.

public IReadOnlyList<ExcelFormulaSyntaxNode> Nodes { get; } #

Ordered syntax nodes preserving the authored formula.