Hi All,
I need to export data from the grid to an excel file.In my grid, for some column the background colour is set based on the cell value.Can anyone please let me know is there any way to retain these colours in excel file.

my code is as shown bellow

IFormatProvider culture = new CultureInfo("en-US", true);

using (db)

var mhExportData = (from mhad in db.MhWebAdditionalDatas
(sExtraction.IsEmpty || mhad.MhWebData.ExtractionDate == sExtraction.SelectedDate)
&& (sEriref.IsEmpty || mhad.MhWebData.Eriref.Contains(sEriref.Text))
&& (mhad.MhWebData.Status != "FI")
&& (cbPrivate.Checked || mhad.MhWebData.Status != "PR")
orderby mhad.User.UserSignum, mhad.MhWebData.Eriref
select new
CurrentMHO = mhad.MhWebData.Current_MHO,
ReleaseLabel = mhad.ReleaseLabel1.ReleaseLabel1,
Priority = mhad.Priority1.PriorityCode,
Product = mhad.Product1.ProductCode,
Accountable = mhad.User.UserSignum,
RequestState = mhad.RequestState1.RequestState1,
MhStatus = mhad.MhWebData.Status,
ExpectedReleaseDate = mhad.EndDate,
Eriref = mhad.MhWebData.Eriref,
MhPriority = mhad.MhWebData.Submitter_priority,
Heading = mhad.MhWebData.Heading

Response.ContentType = "text/csv";
Response.AddHeader("Content-Disposition", String.Format("attachment; filename=\"TRExport_{0}.csv\"", DateTime.Now));