How to use no fill for background color of a excel cell using c#?
Assuming that you want to achieve the same state as a cell's initial state (in a new worksheet), use this:
xlRange.Interior.ColorIndex = 0;
Try this:
xlRange.Interior.Pattern = Excel.Constants.xlNone;
xlRange.Interior.TintAndShade = 0;
xlRange.Interior.PatternTintAndShade = 0;
Maybe this is just partly related to this question; but I noticed by using
xlRange.Interior.Pattern = Excel.XlPattern.xlPatternNone;;
Also all cell fill color disappears. This is not the case when using:
xlRange.Interior.Pattern = Excel.XlPattern.xlPatternAutomatic;
I was searching for this and came upon this question, so I add this for extra info.