【Vegas原创】超简单的导出word方法
2014-05-22 15:45
756 查看
//get BBS Content
string strSubject = "【" + drpType.SelectedValue.Trim() + "】" + txtTitle.Text.Trim();
StringBuilder sbContent = getMailContent(strSubject);
//print
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=FileName.doc");
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Write(sbContent.ToString());
Response.End();
注意:
ContentEncoding要选择UTF8
string strSubject = "【" + drpType.SelectedValue.Trim() + "】" + txtTitle.Text.Trim();
StringBuilder sbContent = getMailContent(strSubject);
Response.Clear();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=FileName.doc");
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Write(sbContent.ToString());
Response.End();
注意:
ContentEncoding要选择UTF8
相关文章推荐
- 【Vegas原创】超简单的导出word方法
- 【Vegas原创】超简单的导出word方法
- 【Vegas原创】稍复杂点的导出word方法(利用word书签进行定位)
- 【Vegas原创】稍复杂点的导出word方法(利用word书签进行定位)
- 【Vegas原创】稍复杂点的导出word方法(利用word书签进行定位)
- ASP.NET中导出excel/word等类型文件的简单方法
- 【MVC】 非常简单的页面导出 WORD, EXCEL方法
- ASP.NET中导出excel/word等类型文件的简单方法
- 导出的最简单方法(text/html/word)
- 简单易用的导出文件(Excel、word等各种格式)的方法
- PHP导出word文档的简单实现方法(可导出图片)
- ASP导出为Word或Excel的最简单方法
- ASP.NET中导出excel/word等类型文件的简单方法
- java导出生成word的简单方法
- 原创-Asp.net导出word的方法总结(利用response.write方式将html模板导出word,和dsoframer导出word)
- ASP.NET中导出excel/word等类型文件的简单方法
- ASP.NET中导出excel/word等类型文件的简单方法
- 一键导出Word和Excel文件的简单服务器控件
- (整理) 简单、完美的导出excel/word报表解决方案
- 【Vegas原创】解除繁体/简体编码乱码的方法