[]
This node stores a single double value and can be read or updated after creation.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("LEFT(sheet1!$B$3,1)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
NumberNode numberNode = (NumberNode) functionNode.getChildren().get(1);
double value = numberNode.getValue();
See ConstNode for other constant node types.
getChildrenNumberNode from double value.This constructor initializes a numeric literal node in a formula syntax tree with the specified value.
value - The value of the new NumberNode. Must be a finite number.IllegalArgumentException - if value is NaN or infinite.Returns the double value represented by this NumberNode in the formula syntax tree.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("LEFT(sheet1!$B$3,1)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
NumberNode numberNode = (NumberNode) functionNode.getChildren().get(1);
double value = numberNode.getValue();
double value of this node.sets the double value represented by this NumberNode in the formula syntax tree.
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("LEFT(sheet1!$B$3,1)");
FunctionNode functionNode = (FunctionNode) syntaxTree.getRoot();
NumberNode numberNode = (NumberNode) functionNode.getChildren().get(1);
numberNode.setValue(2);
String formulaText = syntaxTree.toString();
value - The double value of this node.