110,537
社区成员
发帖
与我相关
我的任务
分享
public void HtmlToExcel(HttpResponse Response,string content)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;filename=myexcel.xls");
Response.ContentType = "application/vnd.xls";
Response.Cache.SetCacheability(HttpCacheability.NoCache); // not necessarily required
Response.Charset = "utf-8";
Response.Output.Write(content);
Response.Flush();
Response.End();
}