Versions Compared

Key

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

...

A style can be set or applied to cells, rows, columns, ranges, and areas.

Excerpt

When a style

...

is set, the object to which the style is assigned acquires all of that style's properties, including font properties and number formatting. When a style

...

is applied, only the differences between the new style and existing style properties (assigned through the ExcelWriter API or in Microsoft Excel) will take effect.

For example, if the cell has a background color and the new style applied does not contain a background color, the cell's color will not be affected. Note: Properties that were set on a pre-existing style in a workbook will not be propogated to the object to which a new style is applied.

Note

Setting a style overwrites any pre-existing formatting on the cell, area, or range. Applying a style merges the new style with the previous one.

...

A GlobalStyle is global to a workbook. It can be set or applied to cells, rows, columns, areas, and ranges. When a GlobalStyle is set (using the Style property), subsequent changes to the style affect all cells on which the style was set. When a GlobalStyle is applied (using the ApplyStyle method), subsequent changes to the style will not affect cells to which the style was applied.

Unlike NamedStyles, GlobalStyles are not stored in a collection, so they may be created, but not retrieved. A GlobalStyle is not accessible after the workbook is saved.

...