[]
Specifies the types of condition values that can be used.
Use this enumeration to define how threshold values are determined in conditional formatting rules such as data bars, color scales, and icon sets. Depending on the selected value, the threshold can be based on a fixed number, a percentage, a percentile, a formula, or the lowest or highest value in the range.
public enum ConditionValueTypes
Public Enum ConditionValueTypes
worksheet.Range["A1:A5"].Value = new object[] {10, 30, 50, 70, 90};
IColorScale colorScale = worksheet.Range["A1:A5"]
.FormatConditions.AddColorScale(ColorScaleType.TwoColorScale);
colorScale.ColorScaleCriteria[0].Type = ConditionValueTypes.LowestValue;
colorScale.ColorScaleCriteria[1].Type = ConditionValueTypes.HighestValue;
| Name | Description |
|---|---|
| AutomaticMax | Specifies that the longest data bar is proportional to the maximum value in the range. |
| AutomaticMin | Specifies that the shortest data bar is proportional to the minimum value in the range. |
| Formula | Specifies a formula is used. |
| HighestValue | Specifies the highest value from the list of values. |
| LowestValue | Specifies the lowest value from the list of values. |
| None | Specifies no conditional value. |
| Number | Specifies that a number is used. |
| Percent | Specifies a percentage is used. |
| Percentile | Specifies a percentile is used. |