有近万行数据,用哪种方法把GridView导出到Excel最快?

解决方案 »

  1.   

    http://www.cnblogs.com/lovecherry/archive/2005/03/25/125519.html
      

  2.   

    Response.ContentType = "application/vnd.ms-excel"; 
    Response.Charset = ""; 
    this.EnableViewState = false ; 
    System.IO.StringWriter sw = new System.IO.StringWriter(); 
    System.Web.UI.HtmlTextWriter hw = new HtmlTextWriter(sw); 
    this.GridView1.RenderControl(hw); 
    Response.Write(sw.ToString()); 
    Response.End();