DateTime date = new DateTime();
date = DateTime.Now;
this.Response.Clear();
this.Response.Buffer= true; 
this.Response.Charset="utf-8";
this.Response.AppendHeader("Content-Disposition","attachment;filename=Manufacturing Workshops list-"+date.Year+"_"+date.Month+"_"+date.Day+".xls"); 
this.Response.ContentEncoding=System.Text.Encoding.UTF8;
this.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 
this.EnableViewState = false;

System.Globalization.CultureInfo myCItrad = System.Globalization.CultureInfo.CurrentCulture;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter(myCItrad); 
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);

this.RenderControl(oHtmlTextWriter);

this.Response.Write(oStringWriter.ToString());
this.Response.End();