Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

XLS files use a 56 color palette (see Excel's Color Palette Explained). When using the ExcelApplication's Workbook.Palette, ExcelWriter will throw an error if Palette.GetColor is called , but and the color doesn't exist in the palette, ExcelWriter throws an error. Customers are encouraged to use Palette.GetClosestColor to avoid throwing an exception; calling for colors that don't exist in the palette. ExcelWriter will approximate which color from the 56 color palette to use.

In XLSX files, there are an unlimited number of colors available. Palette.GetClosestColor will return the exact color, rather than an approximation based on the 56-color palette. Customers may need to adjust the colors to retain the original look and feel of the workbook.

Note: XLSX files also have an underlying 56-color palette for the purposes of rendering XLSX files in Excel 2003 (with compatibility pack). This palette can still be modified by ExcelApplication v8. See this post for information on designing Excel 2007/2010 reports that might be viewed in Excel 2003.

...