HotXLS-documentatie

AddCondFormatColorScale2 methode

Adds an Excel 2007+ 2-stop Color Scale conditional formatting rule over a cell range, returning the new TCondFormatRule so the rule's DXF Style override kan vóór het opslaan worden verfijnd. Cellen krijgen een gradiëntvulling die interpoleert tussen AMinColor (at the min threshold) en AMaxColor (at the max threshold). (Available since v2.34.0.)

Syntaxis

functie AddCondFormatColorScale2(const ARange: WideString;
  AMinColor, AMaxColor: LongWord;
  AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
  AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): TCondFormatRule;
ARange WideString. Sqref string, e.g. 'A1:A10'
AMinColor / AMaxColor LongWord. Gradient endpoint colors in Delphi BGR format (R in the low byte)
AMinKind / AMaxKind TXLSCfValueKind. Threshold types — see TXLSCfValueKind
AMinValue / AMaxValue WideString. Drempelwaarde als literal; genegeerd voor automatisch detecterende kinds

Voorbeeld

Dit voorbeeld kleurt A1:A10 van wit naar groen op basis van de minimum- en maximumwaarden van het bereik

Sheet.AddCondFormatColorScale2('A1:A10', $00FFFFFF, $0000FF00);

Zie ook