将Asp.Net页面输出到EXCEL里去

80酷酷网    80kuku.com

  asp.net|excel|页面|asp.net|excel一、定义文档类型、字符编码  









   Response.Clear();


   Response.Buffer= true;



   Response.Charset="utf-8";  



   //下面这行很重要, attachment 参数表示作为附件下载,您可以改成 online在线打开



   //filename=FileFlow.xls 指定输出文件的名称,注意其扩展名和指定文件类型相符,可以为:.doc    .xls    .txt

  .htm  



  


















分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: