This documentation is archived and is not being maintained.

Workbook.IconSets Property

 

Gets the collection of built-in icon sets that can be used to apply a conditional formatting rule to a range in the workbook.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

IconSets IconSets { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.IconSets

A Microsoft.Office.Interop.Excel.IconSets collection that contains the built-in icon set objects that can be used to apply a conditional formatting rule to a range.

You can use an icon set to classify range data into three to five categories separated by threshold values. Each icon represents a range of values. For example, in the Microsoft.Office.Interop.Excel.XlIconSet.xl3Arrows icon set, the red up arrow represents higher values, the yellow sideways arrow represents middle values, and the green down arrow represents lower values.

To apply a conditional formatting rule based on an icon set, create a new Microsoft.Office.Interop.Excel.IconSetCondition by using the Microsoft.Office.Interop.Excel.FormatConditions.AddIconSetCondition method of the FormatConditions property of a range, or the FormatConditions property of a named range. Then, set the Microsoft.Office.Interop.Excel.IconSetCondition.IconSet property to an Microsoft.Office.Interop.Excel.IconSet object that you retrieve from the IconSets property. To specify the Microsoft.Office.Interop.Excel.IconSet object that you want to retrieve, pass in one of the Microsoft.Office.Interop.Excel.XlIconSet enumeration values as an index to the IconSets property.

Return to top
Show: