高分求教,很急!关于下载XLS的问题?

george_yingjun 2003-10-20 02:35:55
下载xls文件时, 缺省是在IE上打开它, 现在我要下载它而不是打开它,该怎么做啊?
大哥大姐帮帮忙?
...全文
28 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
suhuoqiang 2003-10-20
  • 打赏
  • 举报
回复
try use xmlhttp
george_yingjun 2003-10-20
  • 打赏
  • 举报
回复
谢谢拉,我试试看.
孟子E章 2003-10-20
  • 打赏
  • 举报
回复
<%
response.contenttype="application/x-unknown"
response.addheader "Content-Disposition","attachment; filename=" & chr(34) & "hahahahah.doc" & chr(34)

response.binarywrite getBinaryFile("c:\xx.xls")

function getBinaryFile(fileSpec)
Dim adTypeBinary
adTypeBinary = 1
Dim oStream
set oStream = server.createobject("ADODB.Stream")
oStream.Open
oStream.Type = adTypeBinary
oStream.LoadFromFile fileSpec
getBinaryFile= oStream.read
set oStream=nothing
end function
%>
kingdomzhf 2003-10-20
  • 打赏
  • 举报
回复
不行

87,901

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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