2.2.11.2.2.2 Operand Tokens

An operand token represents a value in a formula expression. This token can be either the solitary value in a formula, an argument of a function, the evaluation result of a function, or the evaluation result of a cell reference.

The Formula ABNF and Full Grammar Definition section in this specification defines the valid operand tokens in a formula expression. The syntax for each operand token is described in the Parse Token Definitions section.

In addition to its use in a formula expression, an operand token also specifies a single value that can be persisted in the file and represents one of the tokens specified in the token group vAny.

An operand token can have Value, Unit, Dimension, Currency, and Error State properties.

The Value of an operand token is the value of the structure. When stored in a Cell_Type element, the Value of an operand token is stored in the V attribute with the following exceptions:

  • For a Boolean value, the Value is "FALSE" or "TRUE" but is stored as zero or one, respectively, in the Cell_Type element V attribute.

  • For a currency value, both the Value and Currency are stored in the V attribute.

  • For a multi-dimensional value, the Value, Unit, and Dimension are stored in the V attribute.

  • For a two-dimensional point, the Value and Unit are stored in the V attribute.

  • For an error code, the operand token has no Value.

The Unit, Dimension, and Currency of an operand token give additional meaning to the token’s Value. Not all operand tokens have a Unit, Dimension, or Currency. When stored in a Cell_Type element, the Unit of an operand token is stored in the U attribute.

A Dimension is not persisted unless the token is a PtgNumMultiDim. For a PtgNumMultiDim, the Value and the Dimension are stored in the V attribute as specified by the PtgNumMultiDim format.

Currency values are the only operand tokens to have a Currency. For a currency value, the Value is concatenated with the Currency and stored in the V attribute as specified by the PtgCy parse token format.

The Error State of an operand token represents an error obtained during formula evaluation. Depending on the function, the Error State of an operand token can either be used or ignored during formula evaluation.  When stored in a Cell_Type element, the Error State of an operand token is stored in the E attribute.

An operand token represents, and can be converted into, one of the following types of values.

These conversions translate many different source operand tokens into tokens representing different classes of inputs that are required by functions. Functions can operate on the converted tokens but can also refer to elements of the source token. See the Custom Input Types section for details on common token conversions used by functions.