Types and Values

Each expression has a type. SpreadsheetML formulas support the following types: array, error, logical, number, and text.

An array value or constant represents a collection of one or more elements, whose values can have any type (i.e., the elements of an array need not all have the same type).

An error value (§3.17.2.7) or constant represents an error, and can have any value defined for error-constant3.17.2.1).

A logical value or constant represents a truth value, and can have any value defined for logical-constant3.17.2.1).

A numeric value or constant represents a real number, and can have any value defined for numeric-constant3.17.2.1). The term "number" is used as a generic name for any expression of type number.

A text value or constant represents arbitrary text, and can have any value defined for string-constant3.17.2.1). The term "string" is used as a generic name for any expression of type text.

An implementation is permitted to provide an implicit conversion from string-constant to number. However, the rules by which such conversions take place are implementation-defined.
example: : An implementation might choose to accept "123"+10 by converting the string "123" to the number 123. Such conversions might be locale-specific in that a string-constant such as "10,56" might be converted to 10.56 in some locales, but not in others, depending on the radix point character.

[An implementation is encouraged to support strings at least as long as 32,767 characters. ]

A complex number is represented as a string in one of two equivalent text formats: x + yi or x + yj, where x is the real part, and y is the imaginary part.
example: : "3+4i" and "-2.5-34.6j"