asp导出excel

christy_fang 2009-07-20 09:26:43
本人在做asp的订单的统计分析,最后实现导出功能
因为本人没有学习过asp,所以不知道做啊,
还请大家给个例子啊,呵呵~~~
最好是有实例的那种,可以发到我邮箱
christy_fang_zi@yahoo.com.cn

谢了!···
...全文
64 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
pzhuyy 2009-07-20
  • 打赏
  • 举报
回复
看你怎么导出excel了,最简单的是用csv格式生成下载即可,也可在服务器端用exce.application生成,当然也可在前端用js使用activex实现之。
lzp4881 2009-07-20
  • 打赏
  • 举报
回复
<%
if request.querystring("action")="toExcel" then
Response.ContentType="application/vnd.ms-excel"
Response.AddHeader "content-disposition","attachment;filename=aaa.xls"
end if
if request.querystring("action")="toWord" then
Response.ContentType="application/msword"
Response.AddHeader "content-disposition","attachment;filename=aaa.doc"
end if
%>

<html>
<body>
<table name="data" id="data" width="100%" height="25%" border="0" cellpadding="1" cellspacing="1">
<tr>
<td width="50%" align="center" bgcolor="#FFFFCC"> <strong>职务 </strong> </td>
<td width="50%" align="center" bgcolor="#FFFFCC"> <strong>职级 </strong> </td>
</tr>
</table>
<input type="button" name="out_excel" onClick="location.href='?action=toExcel'" value="导出到excel">
<input type="button" name="out_word" onClick="location.href='?action=toWord'" value="导出到word">

</body>
</html>
shenzhenNBA 2009-07-20
  • 打赏
  • 举报
回复
才20分哦,呵呵... :)
思路:
1,查询出想要的数据
2,FSO对象建立EXCEL文件
3,ASP想EXCEL文件写入查询出的数据
shenzhenNBA 2009-07-20
  • 打赏
  • 举报
回复
才20分哦,呵呵... :)

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧