Hi, I am trying to export 3 different radgrids to three excel worsheets (sheet1, sheet2, sheet3) within the same excel file. Could you please suggest some code on this.
Hi Princy, I have gone through this code before which you suggested above, but not sure how to assign datatable to the new worksheet, could you please suggest some code on this. Thanks.
protected void RadGrid1_GridExporting(object source, GridExportingArgs e)
{
StringBuilder sb = new StringBuilder();
WorksheetElement workSheet = new WorksheetElement("ASP.NET Table"); //create new worksheet
workSheet.Table = ?
workSheet.Render(sb); //generate xmlss code
e.ExportOutput = e.ExportOutput.Replace("</Styles>", "</Styles>" + sb.ToString()); //add the rendered worksheet to the output
}
0
Angel Petrov
Telerik team
answered on 30 Jan 2014, 02:22 PM
Hi Ruby,
I strongly suggest that you examine this link where a possible realization of the scenario is illustrated. The code in the example is configured in such way that the user has the option to export the grids in one spreadsheet or in different ones.
Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.