跳到主要内容

ApiFormatCondition

Represents the ApiFormatCondition class.

Properties

NameTypeDescription
AboveBelowbooleanReturns or sets whether the condition applies above or below the average.
AppliesToApiRangeReturns the range to which this condition applies.
DateOperatorXlTimePeriodsReturns or sets the date operator for time period conditions.
FillColorApiColor | 'No Fill'Returns or sets the background color of the format condition.
Formula1stringReturns or sets the first formula used by the format condition.
Formula2stringReturns or sets the second formula used by the format condition.
NumberFormatstringReturns or sets the number format applied to a cell when the conditional formatting rule evaluates to true.
OperatorXlFormatConditionOperatorReturns the format condition operator.
PTConditionPTConditionReturns the pivot table condition object.
ParentApiRangeReturns the parent range object of the format condition.
PercentRankbooleanReturns or sets whether the rank is percentage-based.
PrioritynumberReturns or sets the priority of the condition.
RanknumberReturns or sets the rank for top/bottom conditional formatting rules.
ScopeTypeXlPivotConditionScopeReturns or sets the scope type for the format condition.
StdDevnumberReturns or sets the number of standard deviations for average conditions.
StopIfTruebooleanReturns or sets whether subsequent conditional formatting rules should be evaluated when this rule evaluates to true.
TextstringReturns or sets the text for text-based conditions.
TextOperatorXlContainsOperatorReturns or sets the text operator for text-based conditions.
TypeXlFormatConditionTypeReturns the format condition type.

Methods

MethodReturnsDescription
DeleteNoneDeletes the current format condition.
GetAppliesToApiRange | nullReturns the range of cells to which the current conditional formatting rule applies.
GetDateOperatorXlTimePeriods | nullReturns the date operator for time period conditions.
GetFillColorApiColor | 'No Fill'Returns the background color for the format condition. Returns 'No Fill' when the background color of the format condition is null.
GetFontApiFont | nullReturns the font applied by the current format condition.
GetFormula1stringReturns the first formula used by the current conditional formatting rule.
GetFormula2stringReturns the second formula used by the current conditional formatting rule.
GetNumberFormatstringReturns the number format applied to a cell when the conditional formatting rule evaluates to true.
GetOperatorXlFormatConditionOperatorReturns the format condition operator.
GetPTConditionPTCondition | nullReturns the pivot table condition object.
GetParentApiRangeReturns the parent range object of the current format condition.
GetPrioritynumberReturns the priority value of the conditional formatting rule.
GetScopeTypeXlPivotConditionScopeReturns the scope type of the conditional formatting rule.
GetTextstringReturns the text value used in text-based conditional formatting rules.
GetTextOperatorXlContainsOperator | nullReturns the text operator for text-based conditional formatting rules.
GetTypeXlFormatConditionTypeReturns the format condition type.
ModifyApiFormatCondition | nullModifies the current format condition with the specified parameters.
ModifyAppliesToRangeNoneSets the cell range to which the current conditional formatting rule applies.
SetBordersNoneSets the border style for the conditional formatting rule.
SetDateOperatorNoneSets the date operator for time period conditions.
SetFillColorNoneSets the background color to the format condition with the previously created color object. Sets 'No Fill' when previously created color object is null.
SetFirstPriorityNoneSets the priority value for the current conditional formatting rule to "1" so that it will be evaluated before all other rules on the worksheet.
SetLastPriorityNoneSets the evaluation order for the current conditional formatting rule so it is evaluated after all other rules on the worksheet.
SetNumberFormatNoneSets the number format applied to a cell when the conditional formatting rule evaluates to true.
SetPriorityNoneSets the priority value of the conditional formatting rule.
SetScopeTypeNoneSets the scope type for the conditional formatting rule.
SetTextNoneSets the text value used in text-based conditional formatting rules.
SetTextOperatorNoneSets the text operator for text-based conditional formatting rules.