Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / ConditionalFormattingAboveAverage Class
Members Example


In This Topic
    ConditionalFormattingAboveAverage Class
    In This Topic
    Represents the Above Average ConditionFormatting, which creates an average from the various values in the area & formats the Cells based on this average.
    Syntax
    'Declaration
     
    
    Public Class ConditionalFormattingAboveAverage 
       Inherits ConditionalFormatting
    'Usage
     
    
    Dim instance As ConditionalFormattingAboveAverage
    public class ConditionalFormattingAboveAverage : ConditionalFormatting 
    Remarks

    A list of preset Styles can be found in the ConditionalFormattingStylePresets enumeration; these can be used to easily determine the Style of the accepted Cells.

    It is also possible to use the SetCustomStyle method to define a custom Style for those Cells.

    Example
    // Adds an above average conditional formatting using all default values.
    ConditionalFormatting cf1 = new ConditionalFormattingAboveAverage().AddAreas( "E1:E10" ) ); 
    
    ConditionalFormatting cf2 = ConditionalFormatting.CreateAboveAverage(ConditionalFormattingStylePresets.LightRedFill, true, true ).AddAreas( "E1:E10" ) );
    
    doc.Worksheets[ 0 ].ConditionalFormattings.Add( cf1 );
    doc.Worksheets[ 0 ].ConditionalFormattings.Add( cf2 );
    Inheritance Hierarchy

    System.Object
       Xceed.Workbooks.NET.ConditionalFormatting
          Xceed.Workbooks.NET.ConditionalFormattingAboveAverage

    Public Constructors
    Public Fields
     NameDescription
    Public FieldSpecifies if the formatting applies to Cells with values above thea area's average value.  
    Public FieldSpecifies if the formatting applies to Cells with values equal to the area's average value.  
    Top
    Public Methods
     NameDescription
    Public MethodOverloaded. Adds ConditionalFormatting to an area determined by two Cells. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting)
    Public MethodAdds ConditionalFormatting in specific areas of the Worksheet. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting)
    Public MethodRemoves all ConditionalFormattings from the Worksheet. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting)
    Public MethodGets the areas using ConditionalFormatting. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting)
    Public MethodOverloaded. Removes ConditionalFormatting from an area identified by Addresses. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting)
    Public MethodRemoves ConditionalFormatting from specific areas of the Worksheet. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting)
    Public MethodSets a custom Style for the ConditionalFormatting. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting)
    Top
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also