ApiFormatCondition
表示 ApiFormatCondition 类。
属性
| 名称 | 类型 | 描述 |
|---|---|---|
| AboveBelow | boolean | 返回或设置条件是应用于高于还是低于平均值。 |
| AppliesTo | ApiRange | 返回此条件应用的区域。 |
| DateOperator | XlTimePeriods | 返回或设置时间段条件的日期运算符。 |
| FillColor | ApiColor | 'No Fill' | 返回或设置格式条件的背景颜色。 |
| Formula1 | string | 返回或设置格式条件使用的第一个公式。 |
| Formula2 | string | 返回或设置格式条件使用的第二个公式。 |
| NumberFormat | string | 返回或设置当条件格式规则计算结果为 true 时应用于单元格的数字格式。 |
| Operator | XlFormatConditionOperator | 返回格式条件运算符。 |
| PTCondition | PTCondition | 返回数据透视表条件对象。 |
| Parent | ApiRange | 返回格式条件的父区域对象。 |
| PercentRank | boolean | 返回或设置排名是否基于百分比。 |
| Priority | number | 返回或设置条件的优先级。 |
| Rank | number | 返回或设置前/后条件格式规则的排名。 |
| ScopeType | XlPivotConditionScope | 返回或设置格式条件的作用域类型。 |
| StdDev | number | 返回或设置平均值条件的标准偏差数。 |
| StopIfTrue | boolean | 返回或设置当此规则计算结果为 true 时是否应计算后续条件格式规则。 |
| Text | string | 返回或设置基于文本的条件的文本。 |
| TextOperator | XlContainsOperator | 返回或设置基于文本的条件的文本运算符。 |
| Type | XlFormatConditionType | 返回格式条件类型。 |
方法
| 方法 | 返回值 | 描述 |
|---|---|---|
| Delete | 无 | 删除当前格式条件。 |
| GetAppliesTo | ApiRange | null | 返回当前条件格式规则应用的单元格区域。 |
| GetDateOperator | XlTimePeriods | null | 返回时间段条件的日期运算符。 |
| GetFillColor | ApiColor | 'No Fill' | 返回格式条件的背景颜色。当格式条件的背景颜色为 null 时返回「无填充」。 |
| GetFont | ApiFont | null | 返回当前格式条件应用的字体。 |
| GetFormula1 | string | 返回当前条件格式规则使用的第一个公式。 |
| GetFormula2 | string | 返回当前条件格式规则使用的第二个公式。 |
| GetNumberFormat | string | 返回当条件格式规则计算结果为 true 时应用于单元格的数字格式。 |
| GetOperator | XlFormatConditionOperator | 返回格式条件运算符。 |
| GetPTCondition | PTCondition | null | 返回数据透视表条件对象。 |
| GetParent | ApiRange | 返回当前格式条件的父区域对象。 |
| GetPriority | number | 返回条件格式规则的优先级值。 |
| GetScopeType | XlPivotConditionScope | 返回条件格式规则的作用域类型。 |
| GetText | string | 返回基于文本的条件格式规则中使用的文本值。 |
| GetTextOperator | XlContainsOperator | null | 返回基于文本的条件格式规则的文本运算符。 |
| GetType | XlFormatConditionType | 返回格式条件类型。 |
| Modify | ApiFormatCondition | null | 使用指定的参数修改当前格式条件。 |
| ModifyAppliesToRange | 无 | 设置当前条件格式规则应用的单元格区域。 |
| SetBorders | 无 | 设置条件格式规则的边框样式。 |
| SetDateOperator | 无 | 设置时间段条件的日期运算符。 |
| SetFillColor | 无 | 使用先前创建的颜色对象设置格式条件的背景颜色。当先前创建的颜色对象为 null 时设置为「无填充」。 |
| SetFirstPriority | 无 | 将当前条件格式规则的优先级值设置为「1」,使其在工作表上的所有其他规则之前计算。 |
| SetLastPriority | 无 | 设置当前条件格式规则的计算顺序,使其在工作表上的所有其他规则之后计算。 |
| SetNumberFormat | 无 | 设置当条件格式规则计算结果为 true 时应用于单元格的数字格式。 |
| SetPriority | 无 | 设置条件格式规则的优先级值。 |
| SetScopeType | 无 | 设置条件格式规则的作用域类型。 |
| SetText | 无 | 设置基于文本的条件格式规则中使用的文本值。 |
| SetTextOperator | 无 | 设置基于文本的条件格式规则的文本运算符。 |