This is a migrated thread and some comments may be shown as answers.

Export ExcelML - Set Column Width?

1 Answer 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
GP
Top achievements
Rank 1
GP asked on 29 Jun 2010, 07:21 PM
Is there a way to set the width of the column when exporting to excel using excelml

I tried using a stylesheet with the grid to export to xml, but the colors don't pass.  ExcelML seems to work better for me on this...so that's why I am trying to see if there is a "width" feature.

Thanks,
GP

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 29 Jun 2010, 09:53 PM
Hello GP,

You could modify the column widths directly on ExcelMLExportRowCreated
protected void RadGrid1_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e)
{
    ...
    foreach (ColumnElement col in e.Worksheet.Table.Columns)
        col.Attributes["ss:Width"] = "300";
}

Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
GP
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or