摘要:
方法一:将页面中的所有元素都导出到excel中Response.Clear();Response.Buffer = true;Response.AppendHeader("Content-Disposition", "attachment;filename="+ (DateTime.Now.ToString("yyyyMMddHHmmss")+Server.UrlEncode("客户回访统计表")) + ".xls");Response.ContentEncoding = System.Text 阅读全文
posted @ 2012-11-08 17:25
塰杺茚佡
阅读(223)
评论(0)
推荐(0)
摘要:
Response.ContentEncoding=//有时用gb2312不能正常显示中文,要用utf-8System.Text.Encoding.GetEncoding("GB2312");Response.AppendHeader("Content-Disposition","attachment;filename="+"result.xls");//必要,做成下载文件//如果要直接在浏览器中打开,把上行注释掉,换成下面这行//Response.ContentType="application/vnd. 阅读全文
posted @ 2012-11-08 16:16
塰杺茚佡
阅读(85)
评论(0)
推荐(0)

浙公网安备 33010602011771号