View Single Post
  #1 (permalink)  
Old August 1st, 2007, 04:07 AM
deb_kareng deb_kareng is offline
Authorized User
Join Date: Sep 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem in exporting data from datagrid to Excel


   facing a problem in exporting datagrid to excel.I need some specific column of the grid(not the whole grid)to be exported to excel.have been able to export the whole grid with the following code

            Response.Buffer= true;
            Response.ContentType = "application/";
            Response.Charset = "";
            this.EnableViewState = false;
            System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
            System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);

So, can anybody tell what should i do?