Background
In ExcelWriter 8, support for the new Open Office XML (OOXML) file formats (XLSX, XLSM) was introduced in ExcelApplication. Since XLSX files have a different file structure than XLS, ExcelApplication uses a separate code base when working with XLSX files.
Using the Color Palette
XLS files use a 56 color palette (see Excel's Color Palette Explained). When using ExcelApplication's Workbook.Palette
, ExcelWriter will throw an error if Palette.GetColor
is called and the color doesn't exist in the palette. Customers are encouraged to use Palette.GetClosestColor
to avoid 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.