[]
A ReferenceNode is a TerminalNode that wraps a Reference object so a cell, range, worksheet, or workbook reference can be represented as a terminal expression node.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("LEFT(sheet1!$B$3,1)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
ReferenceNode referenceNode = (ReferenceNode) functionNode.getChildren().get(0);
Reference reference = referenceNode.getReference();
ReferenceNode(Reference reference) ReferenceNode from a Reference.final Referencefinal voidsetReference(Reference value) getChildrenReferenceNode from a Reference. A ReferenceNode stores a formula reference as a terminal node in the syntax tree.
reference - The reference to associate with this node.Returns the Reference object that represents the reference expression stored in this ReferenceNode.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("LEFT(sheet1!$B$3,1)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
ReferenceNode referenceNode = (ReferenceNode) functionNode.getChildren().get(0);
Reference reference = referenceNode.getReference();
null if no reference has been assigned.Use this method to replace the Reference represented by the current ReferenceNode. The specified value is stored directly and can be retrieved later with getReference().
Reference reference = new Reference();
reference.setRow(0);
reference.setColumn(0);
ReferenceNode node = new ReferenceNode(reference);
Reference updatedReference = new Reference();
updatedReference.setRow(1);
updatedReference.setColumn(2);
node.setReference(updatedReference);
Reference result = node.getReference();
value - The Reference to assign to this node. May be null.