-
Notifications
You must be signed in to change notification settings - Fork 277
Conditional Formatting ‐ Custom Iconsets
OssianEPPlus edited this page Sep 9, 2024
·
14 revisions
As of Epplus 7.0 you can create CustomIconSets with EPPlus
To do so, try e.g.
using (var pck = new ExcelPackage())
{
var threeIcon = wks.ConditionalFormatting.AddThreeIconSet(new ExcelAddress("A1:A20"), eExcelconditionalFormatting3IconsSetType.Triangles);
threeIcon.Icon1.CustomIcon = eExcelconditionalFormattingCustomIcon.RedFlag;
threeIcon.Icon2.CustomIcon = eExcelconditionalFormattingCustomIcon.NoIcon;
threeIcon.Icon3.CustomIcon = eExcelconditionalFormattingCustomIcon.GrayDownInclineArrow;
}
This is also available with FourIcon and FiveIcon sets. The OfficeOpenXml.ConditionalFormatting.eExcelconditionalFormattingCustomIcon
enum includes an option for all icons available in Excel. Note that Icons in excel are counted from the bottom up when editing a rule. So Icon1 will be lowest when looking in settings. Unless you apply reverse icon order
Results:
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