Documentação do HotXLS

Método AddCondFormatColorScale3

Adiciona uma regra de formatação condicional de Escala de Cores com 3 paragens do Excel 2007+ sobre um intervalo de células, devolvendo o novo TCondFormatRule. As células recebem um preenchimento gradiente que interpola entre três paragens de cor: mínimo, meio (por predefinição no 50.º percentil) e máximo. (Disponível desde v2.34.0.)

Sintaxe

function AddCondFormatColorScale3(const ARange: WideString;
  AMinColor, AMidColor, AMaxColor: LongWord;
  AMinKind: TXLSCfValueKind = cfvMinOfRange; const AMinValue: WideString = '';
  AMidKind: TXLSCfValueKind = cfvPercentile; const AMidValue: WideString = '50';
  AMaxKind: TXLSCfValueKind = cfvMaxOfRange; const AMaxValue: WideString = ''): TCondFormatRule;
ARange WideString. Sqref String, e.g. 'A1:A10'
AMinColor / AMidColor / AMaxColor LongWord. Three gradient anchor colors in Delphi BGR formato
AMinKind / AMidKind / AMaxKind TXLSCfValueKind. Threshold types. Mid defaults to cfvPercentile / '50' — the classic "Red–Yellow–Green" Excel preset
AMinValue / AMidValue / AMaxValue WideString. Threshold literal text. AMidValue defaults to '50' to pair with cfvPercentile

Exemplo


Sheet.AddCondFormatColorScale3('A1:A10',
  $000000FF, $0000FFFF, $0000FF00);

Ver também