Documentație HotXLS

Metoda AddCondFormatColorScale2

Adaugă o regulă de formatare condiționată Color Scale cu 2 opriri Excel 2007+ peste un interval de celule, returnând noul TCondFormatRule astfel încât substituția DXF Style a regulii să poată fi rafinată înainte de salvare. Celulele primesc o umplere gradient care interpolează între AMinColor (la pragul minim) și AMaxColor (la pragul maxim). (Disponibil din v2.34.0.)

Sintaxă

function 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. Culorile capetelor de gradient în format Delphi BGR (R în octetul inferior)
AMinKind / AMaxKind TXLSCfValueKind. Threshold types — see TXLSCfValueKind
AMinValue / AMaxValue WideString. Threshold literal; ignored for kinds that auto-detect

Exemplu

Acest exemplu colorează A1:A10 de la alb la verde pe baza valorilor minime și maxime din interval

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

Vezi și