[]
        
(Showing Draft Content)

IIconSets

Interface IIconSets


public interface IIconSets
Represents a collection of icon sets used in an icon set conditional formatting rule.

This collection is available through Workbook.getIconSets() and can be used to retrieve built-in icon sets for icon set conditional formatting and icon-based filtering.


 IIconSets iconSets = workbook.getIconSets();
 IIconSetCondition condition = worksheet.getRange("A1:A5").getFormatConditions().addIconSetCondition();
 IIconSet iconSet = iconSets.get(IconSetType.Icon3Symbols);
 condition.setIconSet(iconSet);
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the icon set with the specified type from the collection.
    int
    Gets the number of icon sets available in the workbook.
  • Method Details

    • getCount

      int getCount()
      Gets the number of icon sets available in the workbook.

      This method returns the size of the IIconSets collection that can be accessed through Workbook.getIconSets().

      
       int iconSetCount = workbook.getIconSets().getCount();
       
      Returns:
      The number of icon sets available in the workbook.
    • get

      IIconSet get(IconSetType Index)
      Returns the icon set with the specified type from the collection.

      Use this method to retrieve a predefined IIconSet and apply it to an icon set conditional formatting rule through IIconSetCondition.setIconSet(IIconSet).

      
       IIconSetCondition condition = worksheet.getRange("A1:A5").getFormatConditions().addIconSetCondition();
       IIconSet iconSet = workbook.getIconSets().get(IconSetType.Icon3Symbols);
       condition.setIconSet(iconSet);
       
      Parameters:
      Index - The IconSetType that specifies which icon set to retrieve.
      Returns:
      The IIconSet that matches the specified icon set type.