public class IconSet
extends java.lang.Object
Example
//Instantiating a Workbook object
Workbook workbook = new Workbook();
Worksheet sheet = workbook.getWorksheets().get(0);
//Adds an empty conditional formatting
int index = sheet.getConditionalFormattings().add();
FormatConditionCollection fcs = sheet.getConditionalFormattings().get(index);
//Sets the conditional format range.
CellArea ca = new CellArea();
ca.StartRow = 0;
ca.EndRow = 2;
ca.StartColumn = 0;
ca.EndColumn = 0;
fcs.addArea(ca);
//Adds condition.
int idx = fcs.addCondition(FormatConditionType.ICON_SET);
fcs.addArea(ca);
FormatCondition cond = fcs.get(idx);
//Get Icon Set
IconSet iconSet = cond.getIconSet();
//Set Icon Type
iconSet.setType(IconSetType.ARROWS_3);
//Put Cell Values
Cell cell1 = sheet.getCells().get("A1");
cell1.putValue(10);
Cell cell2 = sheet.getCells().get("A2");
cell2.putValue(120);
Cell cell3 = sheet.getCells().get("A3");
cell3.putValue(260);
//Saving the Excel file
workbook.save("book1.xlsx");
| Modifier and Type | Method and Description |
|---|---|
ConditionalFormattingIconCollection |
getCfIcons()
Get the
ConditionalFormattingIcon from the collection |
ConditionalFormattingValueCollection |
getCfvos()
Get the CFValueObjects instance.
|
boolean |
getReverse()
Gets the flag indicating whether to reverses the default order of the icons in this icon set.
|
boolean |
getShowValue()
Gets the flag indicating whether to show the values of the cells on which this icon set is applied.
|
int |
getType()
Gets the icon set type to display.
|
boolean |
isCustom()
Indicates whether the icon set is custom.
|
void |
setReverse(boolean value)
Sets the flag indicating whether to reverses the default order of the icons in this icon set.
|
void |
setShowValue(boolean value)
Sets the flag indicating whether to show the values of the cells on which this icon set is applied.
|
void |
setType(int value)
Sets the icon set type to display.
|
public ConditionalFormattingIconCollection getCfIcons()
ConditionalFormattingIcon from the collectionpublic ConditionalFormattingValueCollection getCfvos()
public int getType()
See IconSetType.
public void setType(int value)
See IconSetType.
public boolean isCustom()
public boolean getShowValue()
public void setShowValue(boolean value)
public boolean getReverse()
public void setReverse(boolean value)
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.