How can i set the cell style to percent, number or date for exemple ?
I know that some version of Excel had a limit of style number, if i apply 3 times the same style for 3 differents cells does Excel count only one style or 3 differents styles ?
And if you have to apply same formattings to a range of cells, you 'd better create a style object, set its formattings attributes and apply it to those range of cells.
E.g.,
Workbook workbook = new Workbook(); Worksheet sheet1 = workbook.Worksheets[0]; Cells cells = sheet1.Cells; cells["A1"].PutValue(3537); //Creating a style object and apply it to some cells. Style style = workbook.Styles[workbook.Styles.Add()]; style.Custom = "0%"; cells["A1"].Style = style; cells["A2"].Style = style; workbook.Save("d:\\test\\stylepercent.xls");
Further reference: `http://www.aspose.com/Wiki/default.aspx/Aspose.Cells/PerformanceTips.html`