Cell backgroundcolor


#1

The cell backgroundcolors don’t all seem to work. When i try setting them to Color.LightGrey or some other colors, they come out completely black. When I go into the Excel “Fromat Cells” menu under “Patterns” no color is set there.

How do I correctly set the background color?


#2

Here’s how i tried setting it

oWorkSheet.Cells(y, x).Style.ForegroundColor = Color.LightGray
oWorkSheet.Cells(y, x).Style.Pattern = BackgroundType.Solid

and Also


oWorkSheet.Cells(y, x).Style.BackgroundColor = Color.LightGray
oWorkSheet.Cells(y, x).Style.Pattern = BackgroundType.Solid


#3

Figured it out, had to change the color pallete.