Export DataGridVeiw to excel in C# with cell background colors
you can use cells.interior.color
Range range =
oSheet.get_Range("A" + redRows.ToString(), "J"
+ redRows.ToString());
range.Cells.Interior.Color = System.Drawing.Color.Red;
for more info check Microsoft interop excel to format excel cells
I got the solution, I just went though the source from where I was setting the color, put each cell or DataGridView in loop and through range, applied the colors.
Thanks To All For Your Help
链接地址: http://www.djcxy.com/p/36774.html