title: export data to gridview from excel
body: <pre><code>Response.ClearContent();
  Response.AppendHeader("content.disposition", "attachment;filename=check.xls");
  Response.ContentType = "application/ms-excel";
  StringWriter strwriter = new StringWriter();
  HtmlTextWriter htmlwriter = new HtmlTextWriter(strwriter);
  GridView2.RenderControl(htmlwriter);
  Response.Write(strwriter.ToString());
  Response.End();
  </code></pre>
  
  <p>I 'm trying to import data to excel all the code is executing well but nothing is happing no file is generating, please help me I'm stuck.</p>