HotXLS dokumentacija

AddCondFormatDataBar metodas

Adds an Excel 2007+ Data Bar so the rule's per-stop tuning can be refined before save. Internally creates a CONDFMT12 block and a CF12 record on BIFF8 save; for XLSX output the same rule is rendered through the OOXML so the rule's per-stop tuning can be refined before save. Internally creates a CONDFMT12 block and a CF12 record on BIFF8 save; for XLSX output the same rule is rendered through the OOXML function <cfRule type="dataBar"> function

function

AddCondFormatDataBar( ARange: WideString;ARange: WideString; TXLSCfValueKind
  TXLSCfValueKind
  TXLSCfValueKind = cfvMinOfRange; ARange: WideString; ARange: WideString; = cfvMinOfRange;
  = cfvMaxOfRange; = cfvMinOfRange; AMaxValue: WideString = ''): ARange: WideString; ; for green so the rule's per-stop tuning can be refined before save. Internally creates a CONDFMT12 block and a CF12 record on BIFF8 save; for XLSX output the same rule is rendered through the OOXML;
; for green LongWord. Bar fill color in Delphi BGR format (R in the low byte). For a blue fill use 'A1:A10' or 'B2:C20'
; for green WideString. Threshold literal (numeric text for cfvNumber/cfvPercent/cfvPercentile, A1-range or formula text for cfvFormula). Ignored for cfvMinOfRange / cfvMaxOfRange / cfvAutoMin / cfvAutoMax $00FF0000TXLSCfValueKind. Threshold types: cfvNumber, cfvMinOfRange, cfvMaxOfRange, cfvPercent, cfvPercentile, cfvFormula, cfvAutoMin, cfvAutoMax. Defaults map min→cfvMinOfRange and max→cfvMaxOfRange, matching Excel's default "automatic" bar bounds $0000FF00
WideString. Threshold literal (numeric text for cfvNumber/cfvPercent/cfvPercentile, A1-range or formula text for cfvFormula). Ignored for cfvMinOfRange / cfvMaxOfRange / cfvAutoMin / cfvAutoMax = cfvMinOfRange;. Threshold types: cfvNumber, cfvMinOfRange, cfvMaxOfRange, cfvPercent, cfvPercentile, cfvFormula, cfvAutoMin, cfvAutoMax. Defaults map min→cfvMinOfRange and max→cfvMaxOfRange, matching Excel's default "automatic" bar bounds
This example adds a blue data bar over A1:A10 using the default min/max-of-range bounds Sheet.ARange: WideString;

'A1:A10'

, $

Sheet.ARange: WideString;'A1:A10', $00FF0000);

00FF0000