Response.Clear(); 
Response.Buffer= true; 
Response.Charset="GB2312";
string strFileName = Server.UrlPathEncode("监测报表") + "(" + this.txtStatisticDate.Text.Trim() + ")";
Response.AppendHeader("Content-Disposition","attachment;filename=" + strFileName + ".xls");
Response.ContentEncoding=System.Text.Encoding.GetEncoding("gb2312");
Response.ContentType = "application/ms-excel";
this.EnableViewState = false; 
System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); 
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter); 
this.lblReport.RenderControl(oHtmlTextWriter);
string strTmp = oStringWriter.ToString();
strTmp = strTmp.Replace("border=0","border=1");
strTmp = strTmp.Replace("height=23","height=18");
Response.Write(strTmp);
Response.End();结果就是乱码,但有的时候是好的,好的情况下感觉表格数据量少,所以我推测是HTML文本太长导致的,大家帮忙亚,为什么如此的不稳定?谢谢!