There are a few ways to color select cells.
Either way, you need to calculate the range of the cells in question.
Let’s use the Set Range Color method:
For each row in dt1 // set Output index in properties = cellIndex
Assign cellRange = Convert.ToChar(dt1.Columns.IndexOf("description")+65).ToString+(cellIndex+2).ToString
Set Range Color using cellRange. For color, type Color., and after the period a list of colors should show up
so, you’ll need to verify that the Range was calculated correctly first, and if not, make the adjustment.
If the column goes passed column ‘Z’ in Excel, then calculating the letter is more complicated than simply using Convert.ToChar().
If you don’t want to use Set Range Color, the other method involves a key combination to set the color from the Ribbon, which works well for me since the colors are shades that I like.
I hope this helps.