Hello Melba,
can you appreciate till when you solve the problem with the CodeName?? It's very important for us!! ;-(
Your style example works, but i tried something different. I tried this:
IStyle myRowStyle, myCellStyle;
myRowStyle = workbook.Styles.Add("MyRowStyle");
myRowStyle.ColorIndex = ExcelKnownColors.Magenta;
myCellStyle = workbook.Styles.Add("MyCellStyle");
myCellStyle.Font.FontName = "Arial Black";
sheet.Range["A15"].EntireRow.CellStyleName = "MyRowStyle";
sheet.Range["B15"].CellStyleName = "MyCellStyle";
sheet.Range["B15"].Text = "Bold text with(out) background color";
In this case the cell style overrides the background color of the row style. But i want that only the style properties i set have an effect on the cell. In this case the font style.
I attached an .xls file with an example how it works with format templates in excel.
I hope it will help you.
Thanks for your efforts
Marcus
Styles0.zip