Class ExcelConditionalFormatCellIsAttribute
- Namespace
- BigExcelCreator.ClassAttributes
- Assembly
- BigExcelCreator.dll
Adds a conditional formatting rule based on a cell value (CellIs)
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
[CLSCompliant(false)]
public sealed class ExcelConditionalFormatCellIsAttribute : Attribute
- Inheritance
-
ExcelConditionalFormatCellIsAttribute
- Inherited Members
Constructors
ExcelConditionalFormatCellIsAttribute(int, ConditionalFormattingOperatorValues, string, string)
Adds a conditional formatting rule based on a cell value (CellIs) with the specified format, operator, and comparison values.
public ExcelConditionalFormatCellIsAttribute(int format, ConditionalFormattingOperatorValues @operator, string value, string value2 = null)
Parameters
formatintThe index of the conditional format to apply when the condition is met.
operatorConditionalFormattingOperatorValuesThe comparison operator used to evaluate the cell value.
valuestringThe first value to compare against the cell value. Cannot be null.
value2stringThe second value to compare against the cell value, used for operators that require two values. Optional; may be null for single-value operators.
ExcelConditionalFormatCellIsAttribute(string, ConditionalFormattingOperatorValues, string, string)
Adds a conditional formatting rule based on a cell value (CellIs) with the specified format, operator, and comparison values.
public ExcelConditionalFormatCellIsAttribute(string styleName, ConditionalFormattingOperatorValues @operator, string value, string value2 = null)
Parameters
styleNamestringThe name of the style to apply when the conditional formatting rule is met. Cannot be null or empty.
operatorConditionalFormattingOperatorValuesThe comparison operator used to evaluate the cell's value against the specified criteria.
valuestringThe first value to compare the cell's value against, according to the specified operator. Cannot be null.
value2stringThe second value to use for comparison when the operator requires two values; otherwise, null.
Properties
Format
The format ID of the differential format in styleSheet to apply when the condition is met. See GetIndexDifferentialByName(string).
public int Format { get; }
Property Value
Operator
The operator to use for the conditional formatting rule.
public ConditionalFormattingOperatorValues Operator { get; }
Property Value
StyleName
The differential style name to apply to the cell.
public string StyleName { get; }
Property Value
Value
The value to compare the cell value against.
public string Value { get; }
Property Value
Value2
The second value to compare the cell value against, used for "Between" and "NotBetween" operators.
public string Value2 { get; }