HotXLS-documentatie

AddCondFormatDataBar methode

Adds an Excel 2007+ Data Bar conditional formatting rule over a cell range, returning the new TCondFormatRule so the rule's per-stop tuning can be refined before save. Internally creates a CONDFMT12 block en a CF12 record on BIFF8 save; for XLSX output the same rule is rendered through the OOXML <cfRule type="dataBar"> element. (Available since v2.34.0.)

Syntaxis

functie AddCondFormatDataBar(const ARange: WideString;
  AColor: LongWord;
  AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
  AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): TCondFormatRule;
ARange WideString. Sqref string, e.g. 'A1:A10' of 'B2:C20'
AColor LongWord. Staafvulkleur in Delphi BGR-formaat (R in de lage byte). Gebruik voor een blauwe vulling $00FF0000; for green $0000FF00
AMinKind / AMaxKind TXLSCfValueKind. Threshold types: cfvNumber, cfvMinOfRange, cfvMaxOfRange, cfvPercent, cfvPercentile, cfvFormula, cfvAutoMin, cfvAutoMax. Defaults map min→cfvMinOfRange en max→cfvMaxOfRange, overeenkomstig de standaard "automatische" staafgrenzen van Excel
AMinValue / AMaxValue WideString. Drempelliteral (numerieke tekst voor cfvNumber/cfvPercent/cfvPercentile, A1-bereik of formuletekst voor cfvFormula). Genegeerd voor cfvMinOfRange / cfvMaxOfRange / cfvAutoMin / cfvAutoMax

Voorbeeld

dit voorbeeld legt een blauwe databalk over A1:A10 met de standaard min/max-van-bereikgrenzen

Sheet.AddCondFormatDataBar('A1:A10', $00FF0000);

Zie ook