Skip to content

Conditional Formatting ‐ Custom Iconsets

Mats Alm edited this page Nov 10, 2026 · 16 revisions

This page has moved. The current version of this page is at https://epplussoftware.com/docs/styling/conditional-formatting/custom-iconsets/. The EPPlus documentation is no longer updated in this wiki; please use the EPPlus guides and update your bookmarks.

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:

image

image


Back to Conditional Formatting

EPPlus wiki

Versions

Worksheet & Ranges

Styling

Import/Export data

Formulas and filters

Charts & Drawing objects

Tables & Pivot Tables

VBA & Protection

Clone this wiki locally

⌂ 换网址