[]
Specifies the text matching operator used by a TextString conditional formatting rule.
Use this enumeration with TextOperator to control whether the rule checks whether cell text contains, does not contain, begins with, or ends with the specified text.
public enum ContainsOperator
Public Enum ContainsOperator
worksheet.Range["A1:A4"].Value = new object[,] {{"Apple"}, {"Pear"}, {"Apricot"}, {"Plum"}};
IFormatCondition condition = (IFormatCondition) worksheet.Range["A1:A4"].FormatConditions.Add(FormatConditionType.TextString);
condition.Interior.Color = Color.Yellow;
condition.Text = "Ap";
condition.TextOperator = ContainsOperator.BeginsWith;
| Name | Description |
|---|---|
| BeginsWith | Begins with a specified value. |
| Contains | Contains a specified value. |
| DoesNotContain | Does not contain the specified value. |
| EndsWith | Ends with the specified value. |