Reusing Style Objects
Contents
[
Hide
]
Reusing style objects can save memory and make a program faster.
To apply some formatting to a large range of cells in a worksheet:
- Create a style object.
- Specify the attributes.
- Apply the style to the cells in the range.
Because the Cell.GetStyle/Cell.SetStyle approach uses a lot less memory, and is efficient, the older Cell.Style property which consumed a lot of unnecessary memory, was removed with the release of Aspose.Cells 7.1.0.