Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
XL.ConditionalFormating.Add3ColorScaleFormulaRule
Adds a conditional formatting rule that creates a gradated 3-color scale on the cells.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
XL | 14.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "XL.ConditionalFormating.Add3ColorScaleFormulaRule"; bookRef; ConditionalFormattingRef; minColor; maxColor { ; minType; minValue; midType; midValue; maxType; maxValue; stopIfTrue } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
bookRef | The reference to the workbook. Please use XL.LoadBook to load a file. | $ref | |
ConditionalFormattingRef | The reference number for the conditional formatting. | $ConditionalFormatting | |
minColor | the color for minimum | ||
maxColor | the color for maximum | ||
minType | the type of minValue, see values below. Defaults to 2 for CFVO_FORMULA. |
2 | Optional |
minValue | The formula expression for minimum. Defaults to "". |
"" | Optional |
midType | the type of midValue, see values below. Defaults to 2 for CFVO_FORMULA. |
2 | Optional |
midValue | The formula expression for midpoint. Defaults to "". |
"" | Optional |
maxType | The type of maxValue, see values below. Defaults to 2 for CFVO_FORMULA. |
2 | Optional |
maxValue | The formula expression for maximum. Defaults to "". |
"" | Optional |
stopIfTrue | If true, no rules with lower priority may be applied over this rule, when this rule is true. Defaults to false. |
false | Optional |
Result
Returns OK or error.
Description
Adds a conditional formatting rule that creates a gradated 3-color scale on the cells.Possible values for minType, midType and maxType parameters:
Name | Value | Description |
CFVO_MIN | 0 | indicates that the minimum value in the range shall be used as the minimum value for the gradient |
CFVO_MAX | 1 | indicates that the maximum value in the range shall be used as the maximum value for the gradient |
CFVO_FORMULA | 2 | the minimum/midpoint/maximum value for the gradient is determined by a formula |
CFVO_NUMBER | 3 | indicates that the minimum/midpoint/maximum value for the gradient is specified by a constant numeric value |
CFVO_PERCENT | 4 | value indicates a percentage between the minimum and maximum values in the range shall be used as the minimum/midpoint/maximum value for the gradient |
CFVO_PERCENTILE | 5 | value indicates a percentile ranking in the range shall be used as the minimum/midpoint/maximum value for the gradient |
See also
- XL.ConditionalFormating.Add2ColorScaleFormulaRule
- XL.ConditionalFormating.Add2ColorScaleRule
- XL.ConditionalFormating.Add3ColorScaleRule
- XL.LoadBook
Blog Entries
Created 30th March 2024, last changed 31st March 2024
XL.ConditionalFormating.Add2ColorScaleRule - XL.ConditionalFormating.Add3ColorScaleRule
