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

Dynamically apply background color of excel rows using c#

$
0
0

I have exported an excel document. In that, I have to apply the background color of the entire row based on some conditions. For example, If I have 1000 lines in the excel, I want to apply the background in 100 rows only.

I tried to set the color with range values. I am able to apply a color based on that. But I couldn't apply particular rows alone.

objSHT.Range["A1: A11"].Interior.Color = ColorTranslator.ToOle((System.Drawing.Color)colorConverter.ConvertFromString("#97C2EC"));

Could you please provide me the solution to apply the color in an entire row (particular row - based on column value condition)?


Viewing all articles
Browse latest Browse all 88854

Trending Articles



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