Page tree

Versions Compared

Key

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

Whenever you change the Cell.Style property, that Cell gets its own Style object. However, if you create a new Style object and then call SetStyle or ApplyStyle on the area (Area.ApplyStyle(Style), Area.SetStyle(Style)) or range (Range.ApplyStyle(Style), Range.SetStyle(Style)) you want to affect, ExcelApplication will not have to create a seperate Style object for each cell, reducing the amount of memory that is needed. For example, if you are applying the same style to more than one or two cells, you should say:

...

Excerpt

Using one of these two techniques to apply styles will use less memory than creating a new style for each cell or modifying the Cell.Style property directly.

For more information about using Styles in ExcelWriter, please refer to our tutorial Styles in ExcelWriter.