手机
当前位置:查字典教程网 >编程开发 >ASP教程 >asp导出excel文件最简单方便的方法
asp导出excel文件最简单方便的方法
摘要:由于excel软件能识别table格式的数据,所以asp只需要输出table格式的html代码,同时设置好contenttype,增加保存为...

由于excel软件能识别table格式的数据,所以asp只需要输出table格式的html代码,同时设置好contenttype,增加保存为附件的响应头即可将输出的html代码保存为xls文件。

asp导出excel文件源代码如下:

复制代码 代码如下:

<%

Response.ContentType = "application/excel"

Response.AddHeader "Content-Disposition", "attachment;filename=""xxxx.xls"""

%>

<table>

<%while not rs.eof %>

<tr><td>你的excel单元格内容,有多个自己增加td</td></tr>

<%

rs.movenext

wend

%>

</table>

【asp导出excel文件最简单方便的方法】相关文章:

asp文件上传:文件上传 源代码

ASP中利用execute实现动态包含文件的方法

asp简单文本计数器

ASP利用adodb.stream下载文件但不打开的方法

Jmail组件发送邮件之绝对能用的函数

asp.net计算每个页面执行时间的方法

asp复制文件夹代码

asp 导航excel数据到mssql access mysql 等数据方法

asp中FSO复制文件代码

asp代码实现access数据导出到excel文件

精品推荐
分类导航