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

    Show / Hide Table of Contents

    AboveOrBelowAverageCondition Class

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

    Represents a condition that formats only cells with values that are above or below average.

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

    AboveOrBelowAverageCondition is not supported in XLS file format.

    Properties

    Below

    Gets or sets a value indicating whether to format cells with values below average.

    Default value is false (formats cells with values above average).

    • C#
    • VB.NET
    public bool Below { get; set; }
    Public Property Below As Boolean
    Property Value
    System.Boolean

    true to format cells with values below average; otherwise, false.

    ConditionType

    Gets the AboveOrBelowAverage value.

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

    The AboveOrBelowAverage value.

    Overrides
    FormatCondition.ConditionType

    Equal

    Gets or sets a value indicating whether to format cells with values equal to average.

    Default value is false (formats cells with values exclusively above or below average).

    • C#
    • VB.NET
    public bool Equal { get; set; }
    Public Property Equal As Boolean
    Property Value
    System.Boolean

    true to format cells with values equal to average; otherwise, false.

    StandardDeviations

    Gets or sets the number of standard deviations above or below average.

    Only cells with values above or below average ± StandardDeviations * std are formatted.

    Default value is 0.

    • C#
    • VB.NET
    public int StandardDeviations { get; set; }
    Public Property StandardDeviations As Integer
    Property Value
    System.Int32

    The number of standard deviations above or below average.

    Exceptions
    System.ArgumentOutOfRangeException

    Value is less than zero.

    See Also
    Standard deviation (std)

    Style

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

    • 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 AboveOrBelowAverageCondition.

    Methods

    ToString()

    Returns a System.String that represents this AboveOrBelowAverageCondition instance.

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

    A System.String that represents this AboveOrBelowAverageCondition 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.