HttpResponse response = HttpContext.Current.Response; response.Buffer = true; response.Clear(); response.ClearContent(); response.AddHeader("Content-Disposeition",string.Format(attachment;filename="+HttpUtility.UrlEncode(excelname,Encoding.UTF8).ToString()+".xls",DateTime.Now.ToString("yyyyy"))); response.ContentType = "application/ms-execl"; response.ContentEncoding = System.Text.Encoding.UTF8; response.Charset="GB2312"; response.BinaryWrite(bytes); response..Flush(); response.Close();