Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 28, 2012 07:41 AM by Decker Dong - MSFT
Dec 27, 2012 01:58 PM|LINK
I have a situation where my RadGrid has some rows Containing multiple rows
When I export this using RadGrid's export functionality, I see multiple cells used for 1 cell
Dec 27, 2012 02:22 PM|LINK
Dec 27, 2012 02:36 PM|LINK
<ExportSettings IgnorePaging="True" HideStructureColumns="true" ExportOnlyData="True">
I use these values with RadGrid and when I export to Excel, it generates a separate cell for each row (which I cant leave like that)
Dec 28, 2012 12:29 AM|LINK
Considering it that this belongs to a 3-rd party control tool of Telerik, I'm afraid Microsoft cannot do much comments on that.
If you'd like to use GridView instead (because that's Microsoft control). I'd like to recommand you this:
Dec 28, 2012 07:24 AM|LINK
I use standart GridView to export to excel but the same thing happens.
HTML code is separated into multiple cells :(
protected void ExceleAktarLinkButton_Click(object sender, EventArgs e)
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
//HTML Codes into Visual HTML
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
for (int j = 0; j < e.Row.Cells.Count; j++)
string encoded = e.Row.Cells[j].Text;
e.Row.Cells[j].Text = Context.Server.HtmlDecode(encoded);
Screenshot(below) when exported from standart GridView.
1 cell in my GridView is separated into multiple rows :(
Dec 28, 2012 07:41 AM|LINK
To be very honest, it's not an easy task to export a GridView with Html formation.
Maybe you can try to use this tool: