[]
Specifies the operator used in a formula syntax tree.
Use this enum with OperatorNode to represent arithmetic, comparison, reference, text-concatenation, and dynamic-array operators when building or inspecting parsed formulas.
public enum OperatorKind : byte
Public Enum OperatorKind As Byte
FormulaSyntaxTree syntaxTree = new FormulaSyntaxTree();
OperatorNode rootNode = new OperatorNode(OperatorKind.Multiply);
syntaxTree.Root = rootNode;
Reference reference = new Reference();
reference.Row = 0;
reference.Column = 0;
reference.LastRow = 7;
reference.LastColumn = 4;
reference.IsRowRelative = false;
reference.IsColumnRelative = true;
reference.IsLastRowRelative = false;
reference.IsLastColumnRelative = true;
rootNode.Children.Add(new ReferenceNode(reference));
rootNode.Children.Add(new NumberNode(9));
UnParseContext context = new UnParseContext();
context.IsR1C1 = true;
string formulaText = syntaxTree.ToString(context);
| Name | Description |
|---|---|
| Addition | Represents the + operator.
The + operator has the primary purpose of adding two numbers. This operator is
defined only for Syntax: Parts: |
| Concatenate | Represents the
Concatenation operators join multiple strings into a single string. The
Syntax: Parts: |
| Division | Represents the / operator. Divides two numbers and returns a floating-point result, including any remainder.
The Syntax: Parts: |
| Equality | Represents the = operator. The equality operator compares two expressions to determine whether or not they are equal. Syntax: Parts: |
| Exponent | Represents the ^ operator.
Raises a number to the power of another number, always as a Syntax: Parts: |
| GreaterThan | Represents the > operator.
The greater than operator compares two expressions to determine whether the
left side is greater than the right side. |
| GreaterThanOrEqual | Represents the >= operator.
The greater than or equal operator compares two expressions to determine whether the
left side is greater than or equal to the right side. |
| Inequality | Represents the <> operator. |
| Intersection | Represents the (space) operator. The intersection operator gives a reference to the cells that are common to two range arguments. Syntax: |
| LessThan | Represents the < operator.
The less than operator compares two expressions to determine whether the left
side is less than the right side. |
| LessThanOrEqual | Represents the <= operator. |
| Multiply | Represents the Multiplies two numeric expressions and returns their product. Syntax: Parts: |
| Percentage | Represents the % operator.
Divides a numeric expression by 100 and returns the result as a percentage value. |
| Range | Represents the
The range operator returns a reference to all cells between the start and end
reference cells, including both endpoints. |
| Single | Represents the @ operator. |
| Spill | Represents the
Refers to the entire spill range from the specified cell. |
| Subtraction | Represents the - operator.
Returns the difference between two numeric expressions or the negative value
of a numeric expression. |
| Union | Represents the The union operator combines two or more references into a single reference. Syntax: |