title: Error in GridView Export
body: <p>I am exporting a gridview to an excel. The export works fine but the Excel 2010 throws an error and doesn't open the exported file. This problem doesn't occur when the rowCount is less than 1600, but it takes time to open the file when the rowCount is more than 1000(you should wait and not even scroll the excel until it is opened). I have tried changing the Character Encoding to UTF-8 but with no luck. This doesn't seem to be a data issue also, as I reversed the resultset using OrderBy in SQL query, and it worked fine when the rowCount is less than 1600. Even I used Javascript to export but that too had the same error.</p>
  
  <p>The code which I use to export is :</p>
  
  <pre><code>        Response.Clear()
          Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xls", "tExcel"))
          Response.Charset = "UTF-8"
          Response.ContentType = "application/vnd.ms-excel"
          Response.ContentEncoding = System.Text.UTF8Encoding.UTF8
          stringWrite = New StringWriter()
          htmlWrite = New HtmlTextWriter(stringWrite)
          gvExport.RenderControl(htmlWrite)
          Response.Write(stringWrite.ToString())
          Response.End()
  </code></pre>
  
  <p>Please assist me in resolving this issue.</p>