[]
        
(Showing Draft Content)

GrapeCity.Spreadsheet.IFormatCondition.Modify

Modify Method

Modify(FormatConditionType, FormatConditionOperator, string, string, ContainsOperator, TimePeriods)

Modifies an existing conditional format.

Declaration
bool Modify(FormatConditionType type, FormatConditionOperator @operator = FormatConditionOperator.Equal, string formula1 = null, string formula2 = null, ContainsOperator textOperator = ContainsOperator.Contains, TimePeriods dateOperator = TimePeriods.Today)
Function Modify(type As FormatConditionType, Optional [operator] As FormatConditionOperator = FormatConditionOperator.Equal, Optional formula1 As String = Nothing, Optional formula2 As String = Nothing, Optional textOperator As ContainsOperator = ContainsOperator.Contains, Optional dateOperator As TimePeriods = TimePeriods.Today) As Boolean
Parameters
Type Name Description
FormatConditionType type

Specifies whether the conditional format is based on a cell value or an expression.

FormatConditionOperator operator

The conditional format operator. If type is TextString or Expression, it'll be ignored.

string formula1

The value or expression associated with the conditional format. Can be a constant value, a string value, a cell reference, or a formula.

string formula2

The value or expression associated with the second part of the conditional format when Operator is xlBetween or xlNotBetween (otherwise, this argument is ignored). Can be a constant value, a string value, a cell reference, or a formula.

ContainsOperator textOperator

The conditional format text operator. If type isn't TextString, it'll be ignored.

TimePeriods dateOperator

The date operator used in the format condition.

Returns
Type Description
bool

true if the conditional format is modified, false otherwise.

Remarks

If the type is Databar or IconSet or ColorScale, the current conditional format will be replaced by a new conditional format.

Modify(ContainsOperator, string)

Modifies an existing conditional format.

Declaration
bool Modify(ContainsOperator @operator, string text)
Function Modify([operator] As ContainsOperator, text As String) As Boolean
Parameters
Type Name Description
ContainsOperator operator

The conditional format text operator.

string text

The text associated with the conditional format.

Returns
Type Description
bool

true if the conditional format is modified, false otherwise.

Modify(TimePeriods)

Modifies an existing conditional format.

Declaration
bool Modify(TimePeriods dateOperator)
Function Modify(dateOperator As TimePeriods) As Boolean
Parameters
Type Name Description
TimePeriods dateOperator

The date operator used in the format condition.

Returns
Type Description
bool

true if the conditional format is modified, false otherwise.