I want to color some particular cells of an Excel sheet in C#. I am using this code:
((Range)worksheet.Cells[2, 1]).Interior.Color = XlRgbColor.rgbDarkRed;
But it's throwing an exception:
Exception from HRESULT: 0x800A03EC
How can I resolve this?