ASP.NET数据插入excel中不能超过3000条怎么办?
{
Response.Clear();
Response.Buffer= true;
Response.Charset="GB2312";
Response.AppendHeader("Content-Disposition","attachment;filename=Report.xls");
Response.ContentEncoding=System.Text.Encoding.GetEncoding("GB2312");
Response.ContentType = "application/ms-excel";
//Response.ContentType ="vnd.ms-excel.numberformat:@";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.DataGrid1.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.End();
}
这个是我的代码,我想把已经查出来的数据插入excel中,但excel每页只能插入3000条,怎么能实现插入更多的数据?,我想可以分页就是分别写道sheet1,sheet2..中但我不知道该怎么改,希望各位指教!