According to the documentation, you can add conditional formatting to a cell using the syntax:
.AddConditionalFormat().WhenEquals("=B1")
So, I tried this:
cell.AddConditionalFormat().WhenEquals("=F5=0")
.Fill.SetBackgroundColor(XLColor.FromHtml("#f00"));
However, when I try to do this, load the spreadsheet into Excel and look at the conditional formatting for the cell; it seems to have changed it to the simple type of cell value equals rather than the type of formula. Therefore, I see the following:

but I want to see the following:

What am I missing ??
source
share