I'm having a hard time getting column widths looking nice in a RadGrid Excel export to Biff format. The grid is fairly simple, binding to a dataset with a few DataBound columns.
With no widths set on any of the GridBoundColumns, the grid looks wonderful in HTML (widths set automatically), but the Excel export appears with very small columns (all have width set to zero).
If I manually set widths on each of my GridBoundColumns, again it looks great in HTML but the resulting Excel export has very, very wide columns that run way off the right side of the page. It appears this has to do with Excel measuring column widths in characters and the RadGrid of course handling column widths with pixels. For example, if I set my GridBoundColumn.HeaderStyle.Width = 240, in the resulting Excel file I can see the column width set to 180. Some conversion must be happening here to convert pixels to characters but it's not working right.
Is there any way I can set the Excel columns width equal to the pixel width settings in my RadGrid?
With no widths set on any of the GridBoundColumns, the grid looks wonderful in HTML (widths set automatically), but the Excel export appears with very small columns (all have width set to zero).
If I manually set widths on each of my GridBoundColumns, again it looks great in HTML but the resulting Excel export has very, very wide columns that run way off the right side of the page. It appears this has to do with Excel measuring column widths in characters and the RadGrid of course handling column widths with pixels. For example, if I set my GridBoundColumn.HeaderStyle.Width = 240, in the resulting Excel file I can see the column width set to 180. Some conversion must be happening here to convert pixels to characters but it's not working right.
Is there any way I can set the Excel columns width equal to the pixel width settings in my RadGrid?