Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

Spreadsheetgear - Add background color via conditional formatting

$
0
0

I'm trying to use conditional formatting to add a salmon background color when a cell's value exceeds a certain threshold. Here's my code:

Dim condition As IFormatCondition = thisRow(0, 6).FormatConditions.Add(FormatConditionType.CellValue, FormatConditionOperator.GreaterEqual, 0.035, Nothing)
condition.Interior.Color = Drawing.Color.FromArgb(230, 184, 183)

The condition is created correctly but for whatever reason, instead of setting the background color to salmon, it uses rgb(192, 192, 192).

What am I doing wrong?


Viewing all articles
Browse latest Browse all 88835


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>