data export gird view to excel
<p>export data gird view to excel in asp dot net full data export in excel sheet this is write. 10 column in gird view  but i want to show only 5 column in excel sheet how to solve this problem    </p>

<pre><code>  protected void btnexcel_Click1(object sender, EventArgs e)
    {

    Response.Clear();
    Response.Buffer = true;

    Response.AddHeader("content-disposition",
    "attachment;filename=ActualsAndBudgets.xls");
    Response.Charset = "";
    Response.ContentType = "application/ms-excel";
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    StringWriter sw = new StringWriter();
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    gvdetails.AllowPaging = false;
    fillgrid();
    gvdetails.RenderControl(htw);
    Response.Write(sw.ToString());
    Response.End();
    gvdetails.AllowPaging = true;
    fillgrid();

    }
   public override void VerifyRenderingInServerForm(Control control)
   {

   }
</code></pre>
