下载Excel文件链接 [英] Download Excel file link

查看:72
本文介绍了下载Excel文件链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我的代码可以创建我的.asp页面上显示的Excel数据文件。



代码在我访问页面时自动下载文件。如何仅在单击链接时才能使其工作。



我正在使用的代码是



<%
Response.ContentType = application / vnd.ms-excel
响应。 AddHeader Content-Disposition filename = excelfile.xls
%>





谢谢

解决方案

只需你可以做到这一点



 <   a     href   =  urlpage > 下载<   / a  >  


Hi,

I have code that works to create an Excel file of data presented on my .asp page.

The code automatically downloads the file when I access the page. How do it get it to work only when a link is clicked.

The code I am using is

<%
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "filename=excelfile.xls"
%>



Thanks

解决方案

Simply You can do that

<a href="urlpage"> Download</a>


这篇关于下载Excel文件链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆