Laurence,
Yes, your explanation makes sense, but I still think it is overly complicated to perform such a simple task as bolding the entire row. My solution would be that:
myWorksheet.Cells.Rows(0).Style.Font.IsBold = True
would simply traverse through all the cells in that row and set the font to bold, regardless of what font type/color/size/etc is in each cell. Right now I am achieving this same thing via a loop.
For i As Integer = 0 To myWorksheet.Cells.MaxDataColumn
myWorksheet.Cells(0,i).Style.Font.IsBold = True
Next
Now granted that is only 3 lines of code, but I would assume that the 1 line of code:
myWorksheet.Cells.Rows(0).Style.Font.IsBold = True
would do the same thing as that loop. Doesn't seem very hard. Could you implement this? And don't just do it for Font.IsBold, but for every applicable attribute, such as Color, IsBold, IsItalic, IsStrikeout, IsSubscript, IsSuperscript, Name, Size, Underline. And why stop there when every Style attribute should be able to carry through.
I think this is reasonable and the right way to do it since in Excel I don't have to create a style and then apply that style to the row that I want, I simply click the row header (i.e. myWorksheet.Cells.Rows(0)) and then click Bold (i.e. .Style.Font.IsBold = True).
Please let me know what you think. I just don't see any benefit in creating styles and style flags when you could easily incorporate this into the built-in functionality.
Thanks for your consideration!
Dan