[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Expressions.FormulaSyntaxTree.ToString

ToString Method

ToString()

Returns the formula text represented by this syntax tree.

This method returns the same result as calling ToString(UnParseContext) with the default unparse context. If this syntax tree has no root node, an empty string is returned.

Declaration
public override string ToString()
Public Overrides Function ToString() As String
Returns
Type Description
string

A String containing the formula text, or an empty string if this syntax tree has no root node.

Overrides
Examples
string formula = "SUM(A1:A3)+B1";
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse(formula);
string formulaText = syntaxTree.ToString();

ToString(UnParseContext)

Returns the text for this formula, optionally specifies the formatting behavior.

Declaration
public string ToString(UnParseContext context)
Public Function ToString(context As UnParseContext) As String
Parameters
Type Name Description
UnParseContext context

An UnParseContext that specifies row, column and R1C1 reference style.

Returns
Type Description
string

A string containing the formula.