代码改变世界

[导入]使GridView生成Word Execl文件

2008-04-14 07:40  午夜瞎想  阅读(325)  评论(0编辑  收藏  举报

office的成功不单单是他工具有多好用,他的优势在于整合,利用程序生成word execl等office文件竟然如此容易.不用他们的api照样生成

HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + filename); //必要,做成下载文件
        ////如果要直接在浏览器中打开,把上行注释掉,换成下面这行
        ////如果要保存为xsl,改动格式就可以
&nb

[这文章好像很不错喔!我要查阅完整全文! ]


相关文章:

文章来源:http://hi.doublog.com/master/blog/item/174/