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

Export to Excel

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carlos Amigo
Top achievements
Rank 1
Carlos Amigo asked on 07 Dec 2010, 08:57 PM
I'm exporting a radgrid to Excel successfully. This is my code
gvwMaterial.ExportSettings.ExportOnlyData = true;
gvwMaterial.ExportSettings.IgnorePaging = true;
gvwMaterial.ExportSettings.OpenInNewWindow = true;
gvwMaterial.ExportSettings.Excel.Format = GridExcelExportFormat.Html;
gvwMaterial.ExportSettings.FileName = String.Format("File_{0}_{1}_in_{2}.xls", aaa, bbb.ToString(), ccc.ToString());
gvwMaterial.MasterTableView.ExportToExcel();

When Excel is opened, numbers with decimals, (percents like 0.12), are rounded to 0 or 1
How I can to format this columns?

Thanks

Carlos 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 07 Dec 2010, 10:38 PM
Hello Carlos,

You can set the desired number format using the mso-number-format attribute as explained in our documentation:
Word/Excel export (HTML-based)

Let me know if you need more information.

Kind regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Carlos Amigo
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or