您的位置:首页 > Web前端 > HTML

response导出html到word

2017-05-26 10:48 726 查看
直接贴代码:

Response.AppendHeader("Content-Disposition", "attachment;filename=result.doc");

Response.ContentType = "application/ms-word";

Response.Charset = "GB2312";

Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");

Response.Write("<html xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" xmlns:m=\"http://schemas.microsoft.com/office/2004/12/omml\" xmlns=\"http://www.w3.org/TR/REC-html40\">");

Response.Write(item.ResumeHtml);

Response.Write("</html>");

Response.End();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  html word 导出word