protected void rdData_ExcelMLExportStylesCreated(object source, GridExportExcelMLStyleCreatedArgs e) { StyleElement style = new StyleElement("MyNumberStyle"); style.NumberFormat.FormatType = NumberFormatType.General; style.NumberFormat.Attributes["ss:Format"] = "0.0"; e.Styles.Add(style); } protected void rdData_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e) { e.Row.Cells.GetCellByName("Col1").StyleValue = "MyNumberStyle"; e.Row.Cells.GetCellByName("Col2").StyleValue = "MyNumberStyle"; }
rdData.ExportSettings.ExportOnlyData = true; rdData.ExportSettings.IgnorePaging = true; rdData.ExportSettings.OpenInNewWindow = true; rdData.ExportSettings.Excel.Format = Telerik.Web.UI.GridExcelExportFormat.ExcelML; rdData.MasterTableView.ExportToExcel();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)