The Operand Object

class Operand(akind=None, avalue=None, arank=0, atext='?')

Used in evaluating formulas. The following table describes the kinds and how their values are represented.

Kind Symbol Kind Number Value Representation
oBOOL 3 integer: 0 => False; 1 => True
oERR 4 None, or an int error code (same as XL_CELL_ERROR in the Cell class).
oMSNG 5 Used by Excel as a placeholder for a missing (not supplied) function argument. Should not appear as a final formula result. Value is None.
oNUM 2 A float. Note that there is no way of distinguishing dates.
oREF -1 The value is either None or a non-empty list of absolute Ref3D instances.
oREL -2 The value is None or a non-empty list of fully or partially relative Ref3D instances.
oSTRG 1 A Unicode string.
oUNK 0 The kind is unknown or ambiguous. The value is None
Operand.kind

oUNK means that the kind of operand is not known unambiguously.

Operand.text

The reconstituted text of the original formula. Function names will be in English irrespective of the original language, which doesn’t seem to be recorded anywhere. The separator is ”,”, not ”;” or whatever else might be more appropriate for the end-user’s locale; patches welcome.

Operand.value

None means that the actual value of the operand is a variable (depends on cell data), not a constant.

Previous topic

The Name Class

Next topic

The Ref3D Object

This Page