Versions Compared

Key

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

In ExcelWriter 8, support for the new Open Office XML (OOXML) file formats (XLSX, XLSM) was introduced in ExcelApplication. Since XLSX files have different file format defaults and a different file structure than XLS, ExcelWriter's behavior can change between the two file formats in specific situations. These differences are outlined below.


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 on an XLS file 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.

...

Code Block
//Specify either FileFormat.Xlsx or FileFormat.Xls to create a file
Workbook wb = ExcelApplication.Create(ExcelApplication.FileFormat.Xlsx);

ExcelApplication.Create() has been deprecated in favor of ExcelApplication.Create(FileFormat), but is still available for backwards compatibility.

The Create method 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.

...