'Declaration
Public Class ConditionalFormattingCellHighlight Inherits ConditionalFormatting
'Usage
Dim instance As ConditionalFormattingCellHighlight
public class ConditionalFormattingCellHighlight : ConditionalFormatting
'Declaration
Public Class ConditionalFormattingCellHighlight Inherits ConditionalFormatting
'Usage
Dim instance As ConditionalFormattingCellHighlight
public class ConditionalFormattingCellHighlight : ConditionalFormatting
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.
//Highlights every Cell that contains the value "4" with the default formatting style. ConditionalFormatting cf1 = ConditionalFormatting.CreateCellHighlight( new EqualCondition( 4 ) ).AddArea("A1", "B1"); //Highlights values between 3 and 7 with a red border style. ConditionalFormatting cf2 = ConditionalFormatting.CreateCellHighlight( new BetweenCondition( 3, 7 ), ConditionalFormattingStylePresets.RedBorder ).AddAreas( "F1:F10" ) doc.Worksheets[ 0 ].ConditionalFormattings.Add( cf1 ); doc.Worksheets[ 0 ].ConditionalFormattings.Add( cf2 );
System.Object
Xceed.Workbooks.NET.ConditionalFormatting
Xceed.Workbooks.NET.ConditionalFormattingCellHighlight
Name | Description | |
---|---|---|
![]() | ConditionalFormattingCellHighlight Constructor | Creates a ConditionalFormattingCellHighlight. |
Name | Description | |
---|---|---|
![]() | Condition | Gets the CellHighlightCondition used to determine if formatting will be applied. |
Name | Description | |
---|---|---|
![]() | AddArea | Overloaded. Adds ConditionalFormatting to an area determined by two Cells. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting) |
![]() | AddAreas | Adds ConditionalFormatting in specific areas of the Worksheet. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting) |
![]() | ClearAreas | Removes all ConditionalFormattings from the Worksheet. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting) |
![]() | GetAreas | Gets the areas using ConditionalFormatting. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting) |
![]() | RemoveArea | Overloaded. Removes ConditionalFormatting from an area identified by Addresses. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting) |
![]() | RemoveAreas | Removes ConditionalFormatting from specific areas of the Worksheet. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting) |
![]() | SetCondition | Sets the CellHighlightCondition. |
![]() | SetCustomStyle | Sets a custom Style for the ConditionalFormatting. (Inherited from Xceed.Workbooks.NET.ConditionalFormatting) |
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