[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Expressions.ArrayNode

ArrayNode Class

Represents an array literal node in a formula syntax tree.

An ArrayNode stores a two-dimensional array of constant values that can be used as a literal expression in the syntax tree. Array and element values cannot be null. Supported element types are double, string, bool, and CalcError. Primitive numeric values such as byte, short, int, long, and float are accepted, but they are normalized to double if the node is converted to text and then parsed again. Floating-point values cannot be NaN or infinity.

The array must contain at least one element, and each nested array must use a zero-based lower bound.

Inheritance
ArrayNode
Implements
Namespace: GrapeCity.Documents.Excel.Expressions
Assembly: DS.Documents.Excel.dll
Syntax
public class ArrayNode : ConstNode, ICloneable
Public Class ArrayNode
    Inherits ConstNode
    Implements ICloneable
Examples
FormulaSyntaxTree syntaxTree = FormulaSyntaxTree.Parse("OR(A1={1,3,5})");
FunctionNode functionNode = (FunctionNode)syntaxTree.Root;
OperatorNode operatorNode = (OperatorNode)functionNode.Children[0];
ArrayNode arrayNode = (ArrayNode)operatorNode.Children[1];
object[,] elements = arrayNode.Elements;
object firstValue = elements[0, 0];

Constructors

Name Description
ArrayNode(object[,])

Creates a new ArrayNode from an array.

The specified array defines the literal values stored by this node. The value cannot be null. Supported element types are double, string, bool, and CalcError. Numeric values such as byte, short, int, long, and float are accepted, but they are normalized to double if the node is converted to text and then parsed again. Floating-point values cannot be NaN or infinity.

Properties

Name Description
Elements

Gets or sets the array elements of this node.

The value cannot be null. Supported element types are double, string, bool, and CalcError. Numeric values such as byte, short, int, long, sbyte, ushort, uint, ulong, float, and decimal are accepted, but they are normalized to double if the node is converted to string and parsed again.