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

    Show / Hide Table of Contents

    TopOrBottomRankedCondition Class

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

    Represents a condition that formats only cells with top or bottom ranked values.

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

    TopOrBottomRankedCondition is not supported when writing to XLS file format.

    Properties

    Bottom

    Gets or sets a value indicating whether to format cells with bottom ranked values.

    Default value is false (formats cells with top ranked values).

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

    true to format cells with bottom ranked values; otherwise, false.

    ConditionType

    Gets the TopOrBottomRanked value.

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

    The TopOrBottomRanked value.

    Overrides
    FormatCondition.ConditionType

    Percent

    Gets or sets a value indicating whether the Rank value is expressed as a percentage of a number of cells in the applied range.

    Default value is false (the Rank value is expressed as a number of cells).

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

    true if the Rank value is expressed as a percentage of a number of cells in the applied range; otherwise, false.

    Rank

    Gets or sets the number or percentage of top or bottom ranked cells which are formatted.

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

    The number or percentage of top or bottom ranked cells which are formatted.

    Exceptions
    System.ArgumentOutOfRangeException

    Value is less than or equal to zero.

    Style

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

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

    Methods

    ToString()

    Returns a System.String that represents this TopOrBottomRankedCondition instance.

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

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