关闭

asp中导出Excel的方法

430人阅读 评论(0) 收藏 举报
<script type="text/javascript">google_ad_client = "pub-2048279401139630";google_ad_slot = "8856771542";google_ad_width = 728;google_ad_height = 90;document.write("<s"+"cript type='text/javascript' s"+"rc='http://pagead2.googlesyndication.com/pagead/show_ads"+"."+"js'></scr"+"ipt>");</script>
只要在文件开头写如下代码:
<script type="text/javascript">google_ad_client = "pub-2048279401139630";google_ad_slot = "8856771542";google_ad_width = 728;google_ad_height = 90;document.write("<s"+"cript type='text/javascript' s"+"rc='http://pagead2.googlesyndication.com/pagead/show_ads"+"."+"js'></scr"+"ipt>");</script>
Response.Clear()
Response.ContentType    
= "application/vnd.ms-excel"
Response.AddHeader 
"Content-Disposition""attachment; filename="&Date()&".xls"
Response.Charset 
= "gb2312"
<script type="text/javascript">google_ad_client = "pub-2048279401139630";google_ad_slot = "8856771542";google_ad_width = 728;google_ad_height = 90;document.write("<s"+"cript type='text/javascript' s"+"rc='http://pagead2.googlesyndication.com/pagead/show_ads"+"."+"js'></scr"+"ipt>");</script>
 
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:208800次
    • 积分:4434
    • 等级:
    • 排名:第7144名
    • 原创:100篇
    • 转载:203篇
    • 译文:1篇
    • 评论:101条
    文章分类
    最新评论