Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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.

Creating Files from Scratch

ExcelApplication.Create uses an underlying template with defaults associated with the file format. XLS files use the defaults from Excel 2003; XLSX files use the defaults from Excel 2007. Switching to XLSX means the default template will change and the new defaults may change how output files look.

The largest impact from this relates to named styles. In Excel 2003, the default Normal style is Arial, size 10. In Excel 2007, the default Normal style is Calibri, size 11. Certain settings based on the Normal style, such as default row heights or column widths, will be different between XLS and XLSX files.

To ensure that output remains consistent while switching to XLSX, we recommend creating a blank XLSX file that has the Normal style set to Arial, size 10. Open that blank template file, rather than creating a template from scratch.

Computations and Rounding

Chart defaults

New Excel features

  • No labels