When copying and pasting Excel data, colors are lost
===

At the risk of having this question downvoted into oblivion or closed as "Too Localized", I figured I would post about this issue since my boss complains constantly about it and it has me scratching my head.

We use the [Infragistics NetAdvantage][1] [Excel control][2] to create an Excel report on the fly.  Some cells, we add a fill color like so:

    sheet.Rows[i].Cells[0].CellFormat.FillPattern = FillPatternStyle.Solid;
    sheet.Rows[i].Cells[0].CellFormat.FillPatternForegroundColor = Color.FromArgb(127, 127, 127);

This works great and the report comes out looking fine:

![Working Image][3]

However, if my manager selects all the cells in Excel, copies the data to the clipboard, then *pastes* those cells into another Excel file, all the colors are converted into some weird 3bit palette:

![enter image description here][4]

Now, every Fill color is either pure red (#FF0000), pure green (#00FF00), pure blue (#0000FF) or yellow (#FFFF00).  It's all or nothing of any given color.  That dark grey header even becomes completely white.

One interesting thing is if I go and manually change the fill color of one of those cells in Excel, then copy and paste that, the color I manually set is copied over perfectly while the Infragistics generated cells are dithered.

This only occurs when copying between Excel files, not between Worksheets within an Excel document.  Has anyone ran into this issue, or do any Excel experts know what could cause this from a technical point of view?

This is Excel 2007, and Infragistics Build 8.2.20082.1000.


  [1]: http://www.infragistics.com/products/dotnet/
  [2]: http://www.infragistics.com/products/aspnet/excel-exporter/
  [3]: http://i.stack.imgur.com/Dy6ui.png
  [4]: http://i.stack.imgur.com/2qfNw.png