[]
Specifies the type of a conditional formatting rule.
Use this enumeration to indicate how a conditional format is evaluated or displayed, such as a cell-value rule, expression rule, color scale, data bar, top 10 rule, icon set, or other supported conditional formatting type.
public enum FormatConditionType
Public Enum FormatConditionType
worksheet.Range["A1:A4"].Value = new object[,] {
{10},
{20},
{30},
{40}
};
IFormatCondition condition = (IFormatCondition)worksheet.Range["A1:A4"].FormatConditions
.Add(FormatConditionType.CellValue, FormatConditionOperator.Greater, "25", null);
condition.Interior.Color = Color.Yellow;
| Name | Description |
|---|---|
| AboveAverageCondition | Specifies the above average conditional formatting rule. Use this value for conditional formats that compare each numeric cell in the applied range with the average of that range and apply formatting to cells whose values are above the average. |
| BlanksCondition | Specifies a conditional formatting rule that applies to blank cells. |
| CellValue | Specifies that the conditional format is based on a cell value. Use this value for rules that compare the value of each cell in the applied range against one or two specified values by using a FormatConditionOperator. |
| ColorScale | Specifies a color scale conditional formatting rule. Use this value for conditional formats that apply a gradient of colors to cells to indicate relative differences in their values based on defined thresholds. |
| Databar | Specifies a data bar conditional formatting rule. Use this value for conditional formats that display a bar in each cell to represent the cell's value relative to other values in the applied range. |
| ErrorsCondition | Specifies the condition for conditional formatting rules that apply to cells containing errors. |
| Expression | Specifies that the conditional format is based on an expression. Use this value for a rule that evaluates a formula expression to determine whether the conditional formatting is applied. |
| IconSets | Specifies an icon set conditional formatting rule. Use this value for conditional formats that display icons based on cell values and threshold criteria. |
| NoBlanksCondition | Specifies the conditional formatting rule that applies formatting to cells that are not blank. |
| NoErrorsCondition | Specifies the condition for conditional formatting that applies to cells that do not contain errors. |
| TextString | Specifies the text string condition for conditional formatting. |
| TimePeriod | Specifies a conditional formatting rule that applies to cells whose date values fall within a specified time period. |
| Top10 | Specifies a top or bottom rank conditional formatting rule, including Top 10, Top 10%, Bottom 10, and Bottom 10% evaluations. |
| UniqueValues | Specifies the unique values condition for conditional formatting. |