![]() ![]() ![]() ![]() After you use Cell.GetStyle method to retrieve a Style object, modify it and use Cell.SetStyle method to set back to this cell, this Style object won’t be preserved and. So we add the second approach to optimize memory usage. These Style objects won’t be freed until calling Workbook.Save method. So if there are a lot of cells to be formatted, a large amount of memory will be consumed because Style object is a large object. When you use the first piece of code, a Style object will be initiated for each cell when formatting it. You can see that the first approach is easy and straight-forward. use Cell.GetStyle and Cell.SetStyle method.So now you can use the following two ways to format a cell: Since v4.4.2, we add two new methods to format a cell: Cell.GetStyle method and Cell.SetStyle method. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |