如何使用EPPLUS设置条件格式的字体颜色?

时间:2017-03-16 09:49:41

标签: epplus conditional-formatting

有人知道如何使用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

1 个答案:

答案 0 :(得分:2)

我找到了解决方案:

condSumLn.Style.Font.Color.Color = Drawing.Color.Green