I want to color some particular cells of excel sheet in c#. but I am not getting it.. I am using the code as:
dsNew.Tables[0].Columns[j].Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.DeepPink);
but this is not wrking.. how this can be done.. please do something.. it is giving an error "cannot resolve symbol'interior'"
Try the Range.Interior property:
where
work_sheet
is the Excel.Worksheet you wish to change the cells of.row
andcolumn
or the indices of the cells to change.Your example may be returning an object for the column indexer. Try this: