-
Notifications
You must be signed in to change notification settings - Fork 284
Three Icon Set example
Mats Alm edited this page Oct 26, 2023
·
3 revisions
Here is a Conditional Formatting example where we add a Three Icon Set rule. Let's start with how the result will look like:
Here is how this rule will look like when edited in Excel:
And here is the code to achieve it with EPPlus:
// Use traffic light icons
var cfRule = sheet.ConditionalFormatting.AddThreeIconSet(sheet.Cells["D7:D13"], eExcelconditionalFormatting3IconsSetType.TrafficLights2);
cfRule.Icon2.Type = eExcelConditionalFormattingValueObjectType.Formula;
cfRule.Icon2.Formula = "$E$2 * ($E$4 +1)";
cfRule.Icon3.Type = eExcelConditionalFormattingValueObjectType.Formula;
cfRule.Icon3.Formula = "$E$3";
EPPlus Software AB - https://epplussoftware.com
- What is new in EPPlus 5+
- Breaking Changes in EPPlus 5
- Breaking Changes in EPPlus 6
- Breaking Changes in EPPlus 7
- Addressing a worksheet
- Dimension/Used range
- Copying ranges/sheets
- Insert/Delete
- Filling ranges
- Sorting ranges
- Taking and skipping columns/rows
- Data validation
- Comments
- Freeze and Split Panes
- Header and Footer
- Autofit columns
- Grouping and Ungrouping Rows and Columns
- Formatting and styling
- Conditional formatting
- Using Themes
- Working with custom named table- or slicer- styles