Reusing Style Objects
Contents
[
Hide
]
Reusing style objects can save memory and make the program execute 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.
The same process as discussed above could also be accomplished as follow.
Because the Cell.getStyle and Cell.setStyle methods use a lot less memory and are efficient, the older Cell.getStyle() property which consumed a lot of unnecessary memory, was removed with the release of Aspose.Cells 7.1.0.