I've tried to follow this one: Conditional Formatting by Expression using EPPlus
But in my case, the excel file was corrupted and give me option to recover with rule removed.
I want to achieve this (simplified): screenshot
Here's my codes (for column A):
ExcelWorksheet ew = ep.Workbook.Worksheets.Add("Sheet1");
var cells = new ExcelAddress("A2:A5");
string formula = "ISNUMBER(SEARCH($A$1;C2))";
var condition = ew.ConditionalFormatting.AddExpression(cells);
condition.Formula = formula;
condition.Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid;
condition.Style.Fill.BackgroundColor.Color = System.Drawing.Color.Yellow;
Thanks in advance