GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    FormulaCondition Class

    Namespace:
    GemBox.Spreadsheet.ConditionalFormatting
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a condition that formats only cells for which the specified formula result evaluates to true.

    • C#
    • VB.NET
    public sealed class FormulaCondition : FormatCondition
    Public NotInheritable Class FormulaCondition
        Inherits FormatCondition
    Inheritance:
    System.Object
    FormatCondition
    FormulaCondition

    Properties

    ConditionType

    Gets the Formula value.

    • C#
    • VB.NET
    public override FormatConditionType ConditionType { get; }
    Public Overrides ReadOnly Property ConditionType As FormatConditionType
    Property Value
    FormatConditionType

    The Formula value.

    Overrides
    FormatCondition.ConditionType

    Formula

    Gets or sets the formula used to determine which cells to format (only cells for which the formula result evaluates to true are formatted).

    • C#
    • VB.NET
    public string Formula { get; set; }
    Public Property Formula As String
    Property Value
    System.String

    The formula used to determine which cells to format.

    Exceptions
    System.ArgumentException

    Value is null or System.String.Empty.

    Style

    Gets the actual formatting which will be applied to a cell if its value satisfies this FormulaCondition.

    • C#
    • VB.NET
    public CellStyle Style { get; }
    Public ReadOnly Property Style As CellStyle
    Property Value
    CellStyle

    The actual formatting which will be applied to a cell if its value satisfies this FormulaCondition.

    Methods

    ToString()

    Returns a System.String that represents this FormulaCondition instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this FormulaCondition instance.

    Overrides
    FormatCondition.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Inherited Properties

    Rule

    Gets the conditional formatting rule associated with this condition.

    (Inherited from FormatCondition)

    Examples

    Excel Conditional Formatting example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.