TExportConditionalFormattingRule

Description

TExportConditionalFormattingRule stores a rule in the conditional formatting list of a cell.

Properties

NameTypeDescription
ConditionTExportConditionType of condition:
  • ecEqual: cell value is equal to Limit1.
  • ecNotEqual: cell value is not equal to Limit1.
  • ecGreaterThan: cell value is greater than Limit1.
  • ecLessThan: cell value is less than Limit1.
  • ecGreaterEqual: cell value is greater than or equal to Limit1.
  • ecLessEqual: cell value is less than or equal to Limit1.
  • ecBetween: cell value is between Limit1 and Limit2.
  • ecNotBetween: cell value is not between Limit1 and Limit2.
Limit1AsFormulaOWideStringLimit1 as formula string.
Limit2AsFormulaOWideStringLimit2 as formula string.
Limit1AsNumberDoubleLimit1 as number.
Limit2AsNumberDoubleLimit2 as number.
AlignmentTCellHAlignmentHorizontal alignment
VAlignmentTCellVAlignmentVertical alignment
FontColorTColorFont color
FontStyleTFontStylesFont style
BGColorTColorBackground color

Functions & procedures

function Set*(const *): TExportConditionalFormattingRule;
The Set* functions set the appropriate property and return Self (the formatting rule object). Thanks to this, more Set* functions can be called in one line.
Example:
//var xCell: TExportCell;
with xCell.ConditionalFormatting do begin
  AddRule(ecBetween, 5, 7).SetFontColor(clYellow).SetBGColor(clGreen).
    SetFontStyle([fsBold]);
  AddRule(ecGreaterThan, 10).SetFontColor(clWhite).SetBGColor(clBlack).
    SetFontStyle([fsBold, fsItalic]);
end;
Categories