Skip to main content

TdxSpreadSheetConditionalFormattingRuleExpression.Expression Property

Specifies the formula expression used to calculate a cell formatting criterion.

Declaration

property Expression: string index 0 read; write;

Property Value

Type Description
string

A formula expression string.

Remarks

Both the “Expression“ and “Cell Is“ conditional formatting rules use an ExpressSpreadSheet-compatible formula expression assigned to the Expression property to calculate the cell formatting criteria.

The “Expression” rule applies the custom style only to those affected cells for which the parsed and calculated formula expression returns TRUE.

Unlike “Expression”, the “Cell Is” rule uses a selected operator to compare a specific value or a formula expression result to values stored in the affected cells using the selected comparison operator. This rule additionally uses a value or expression assigned to the Expression2 property in the cicoBetween or cicoNotBetween mode. Refer to the TdxSpreadSheetConditionalFormattingRuleCellIsComparisonOperator type description for detailed information.

Depending on the rule type, the Expression property can return an empty string if the conditional formatting provider‘s formula controller has failed to parse a previously assigned string as:

  • A valid formula expression (in the case of an “Expression” or “Cell Is” rule);

  • A numeric value (a “Cell Is” rule);

  • Any other value that the parser can interpret as a text string (only the “Cell Is” rule in the cicoEqual and cicoNotEqual modes).

Otherwise – the property returns source text that corresponds to a parsed formula expression or value.

The default Expression property value is an empty string.

See Also