He Guides,
I'm new in useing Excel-Export for webgrid.
Is there an option to autoformat the column-width by exporting the grid?
So all columns should be optimized in width after export, not to small and not with many spaces? They should be like they are if you mark a column in excel and say automatic width of column.
Is there an easy option to do it for the export?
Thanks for help.
Carla
Owing to the way Excel measures its column widths and the fact that the Web server doesn't have these font metrics for the user's machine, I'm afraid there isn't an easy option. Please see the following forum posts for background information, and how you can adjust the column width yourself when, based on your knowledge of the data in the column, you have a better idea of how wide the column should be:
"Re: Excel Export: columns width problem"http://news.archive.infragistics.com/readmessage?id=%3C6858678$70151cd6$8f386@news.infragistics.com%3E&group=infragistics.products.netadvantage.aspnet.webgrid
"Re: Excel Export Column Width"http://news.archive.infragistics.com/readmessage?id=%3C40c85887$1@news.shersoft.com%3E&group=infragistics.products.netadvantage.aspnet.webgrid
"Re: Excel export - how to set column width?"http://news.archive.infragistics.com/readmessage?id=%3C435e3f66$1@mailgw.shersoft.com%3E&group=infragistics.products.netadvantage.aspnet.webgrid
I am looking for the equivalent solution to this issue but to automatically control the way rows are automatically expanded based on content - ie in the same way as you select a specific row or worksheet and set rows to autofit height. It is easier column widths but with rows, it is quite important for reports where your users are dependent on seeing all data but know nothing about manipulating excel spreadsheets. I could not seem to find a way to do this nor have i seen anything referring to row heights in the forums.
Any help greatly appreciated.
The Excel assmbly currently supports setting the height on Rows manually, but auto-sizing rows is not supported. You can submit a feature request for this: http://devcenter.infragistics.com/Protected/RequestFeature.aspx.