First, I am using 7.3 and C#.
I would like to format the font size, font name, and font weight / color etc. for the 1st and last Rows in my excel export.
I have a grid that uses footers and the data exports correctly, but I cannot change the font size.I also cannot change the font size etc. for the column headers.
e.Column.CellStyle.Font.Size = FontUnit.Point(8);
e.Column.Footer.Style.Font.Size = FontUnit.Point(10); or e.Column.Header.Style.Font.Size = FontUnit.Point(10);Nothing is affected.What is the correct syntax to make the font size (and other font property) changes to the "Header" and "Footer" rows?
Thanks,
Jonathan
I think you should be able to modify the IWorksheetCellFormat in the HeaderCellExported and FooterCellExported events for these cells, this will have a direct effect on the formatting as Excel sees it.
This next blog entry describes some of the rich formatted string capabilities that should be available to you in 2007 vol. 3,http://blogs.infragistics.com/blogs/derekh/archive/2007/12/27/coloring-keywords-in-your-excel-worksheet.aspx
For Font.Size, use the Height property of the FormattedStringFont instance. Because it is Excel formatting, it is measured in twips, so as a rough rule of thumb, multiply the desired pixel font size by 20.