3 Answers, 1 is accepted
0
Accepted
Hello AG,
Judging by the provided information, you have to set UseAllDataFields to true as explained in our documentation:
ExcelML basics
Kind regards,
Daniel
the Telerik team
Judging by the provided information, you have to set UseAllDataFields to true as explained in our documentation:
ExcelML basics
Kind regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start 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.
0
AG
Top achievements
Rank 1
answered on 31 May 2011, 06:56 PM
Thanks, it worked ! Another question , how to set decimal places in excel and gridlines around it.
Regards,
Regards,
0
Hello AG,
Question 1: How to set decimal places:
Create your own style on ExcelMLExportStylesCreated
Assign this style to the desired cells on ExcelMLExportRowCreated :
For more information please examine the following link:
ExcelML basics
Question 2: How to set gridlines:
Regards,
Daniel
the Telerik team
Question 1: How to set decimal places:
Create your own style on ExcelMLExportStylesCreated
protected void RadGrid1_ExcelMLExportStylesCreated(object source, GridExportExcelMLStyleCreatedArgs e){ StyleElement myStyle = new StyleElement("myCustomStyle"); myStyle.NumberFormat.FormatType = NumberFormatType.Currency; //Option 1: Predefined number format // myStyle.NumberFormat.Attributes["ss:Format"] = "MM/dd"; // Option 2: Custom format myStyle.FontStyle.Bold = true; e.Styles.Add(myStyle);}Assign this style to the desired cells on ExcelMLExportRowCreated :
protected void RadGrid1_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e){ e.Row.Cells.GetCellByName("Name").StyleValue = "myCustomStyle";}For more information please examine the following link:
ExcelML basics
Question 2: How to set gridlines:
protected void RadGrid1_ExcelMLExportStylesCreated(object source, GridExcelBuilder.GridExportExcelMLStyleCreatedArgs e){ StyleElement cstyle = new StyleElement("MyCustomStyle"); BorderStylesCollection borders = new BorderStylesCollection(); BorderStyles borderStyle; for (int i = 1; i <= 4; i++) //four borders { borderStyle = new BorderStyles(); borderStyle.PositionType = (PositionType)i; borderStyle.Color = System.Drawing.Color.Black; borderStyle.LineStyle = LineStyle.Continuous; borderStyle.Weight = 1.0; borders.Add(borderStyle); } foreach (BorderStyles border in borders) cstyle.Borders.Add(border); e.Styles.Add(cstyle);}Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start 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.