Reusing style objects will save memory and make program faster. If you want to apply some common formattings to a large range of cells in a worksheet, you had better create a style object and specify the attributes for your need and apply the style to the cells in the range.
For example, if Cell A1 and A2 has same cell formattings, you can use following two methods to set their formattings:
(1)
Style styleObject = excel.Styles[excel.Styles.Add()];
styleObject.Font.Color = Color.Red;
cells["A1"].SetStyle(styleObject);
cells["A2"].SetStyle(styleObject);
(2)
cells["A1"].Style.Font.Color = Color.Red;
cells["A2"].Style.Font.Color = Color.Red;
The first approach will save memory and be faster. If there are many cells with same formattings, this tip will save a large amount of memory and run much faster.