Custom Iconsets Example
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;
}
Using pck As New ExcelPackage()
Dim 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
End Using
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