[]
FormulaSyntaxTree. Use this class to supply parsing context for FormulaSyntaxTree.Parse(String,ParseContext), such as the formula location and whether references are interpreted in R1C1 style. The base row and base column are zero-based indexes.
ParseContext context = new ParseContext();
context.setBaseRow(0);
context.setBaseColumn(0);
context.setIsR1C1(false);
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("a\\b", context);
SyntaxNode root = syntaxTree.getRoot();
final intfinal intfinal booleanfinal voidsetBaseColumn(int value) final voidsetBaseRow(int value) final voidsetIsR1C1(boolean value) This value identifies the formula's base row in the parse context and is used together with getBaseColumn() when parsing formulas whose references depend on their location, such as R1C1-style references. Use setBaseRow(int) to specify this value before calling FormulaSyntaxTree.Parse(String,ParseContext).
ParseContext context = new ParseContext();
context.setBaseRow(1);
int baseRow = context.getBaseRow();
ParseContext context = new ParseContext();
context.setBaseRow(1);
value - The 0-based row location of the formula.This value is used by ParseContext when parsing formulas that depend on the formula's position, such as relative references.
ParseContext context = new ParseContext();
context.setBaseColumn(7);
int baseColumn = context.getBaseColumn();
This value is used by ParseContext when parsing formulas that depend on the formula's position, such as relative references.
ParseContext context = new ParseContext();
context.setBaseColumn(7);
value - The 0-based column index that represents the formula location.Use this property together with getBaseRow() and getBaseColumn() when the parse context is used for FormulaSyntaxTree.Parse(String,ParseContext). If this method returns true, formula references are parsed as R1C1-style references; otherwise, A1-style references are used.
ParseContext context = new ParseContext();
context.setBaseRow(1);
context.setBaseColumn(4);
context.setIsR1C1(true);
boolean isR1C1 = context.getIsR1C1();
true if the reference style is R1C1; otherwise, false.Use this property together with getBaseRow() and getBaseColumn() when the parse context is used for FormulaSyntaxTree.Parse(String,ParseContext). If this method is set to true, formula references are parsed as R1C1-style references; otherwise, A1-style references are used.
ParseContext context = new ParseContext();
context.setBaseRow(1);
context.setBaseColumn(4);
context.setIsR1C1(true);
value - true if the reference style is R1C1; otherwise, false.