HighTechTalks DotNet Forums  

Exporting Arabic data in GridView to Excel

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss Exporting Arabic data in GridView to Excel in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ania
 
Posts: n/a

Default Exporting Arabic data in GridView to Excel - 09-24-2007 , 10:10 AM






I'm using this code to export a gridview containing arabic data to Excel:

System.Web.HttpResponse Response = System.Web.HttpContext.Current.Response;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new
System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new
System.Web.UI.HtmlTextWriter(oStringWriter);
grdTransactionsReport.RenderControl(oHtmlTextWrite r);
oHtmlTextWriter.Write("/n");
grdTransactionsReport.RenderControl(oHtmlTextWrite r);
Response.Write(oStringWriter.ToString());
Response.End();

This code is working fine, however the grid columns appear reversed in the
Excel.
i.e. If for instance I have gridview columns with this order:
Column1 Column2 Column3
They appear in this order in Excel:
Column3 Column2 Column1.

Is there a way I can show the columns in the right order.

Thanks

P.S. Headers also has Arabic Text


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.