Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the font color for conditional formatting with EPPLUS?

Does anybody know how to set the font color for conditional formatting with EPPLUS?

Using rng = ws.Cells("A7:AD29")
    Dim condSumLn = ws.ConditionalFormatting.AddExpression(rng)
    condSumLn.Style.Font.Bold = True
    condSumLn.Style.Fill.BackgroundColor.Color = Drawing.Color.LightGray
    condSumLn.Formula = "If(OFFSET($AD" & iHeadRow + 1 & ",0,0)>0,1,0)"
End Using
like image 806
afj Avatar asked Dec 28 '25 20:12

afj


1 Answers

I've found the solution:

condSumLn.Style.Font.Color.Color = Drawing.Color.Green
like image 58
afj Avatar answered Dec 31 '25 00:12

afj



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!