在过去,我会遇到同样的情况,所以我做了什么:
文件:下载.ASP
<%
' get the file to download
myFile = request.querystring("File")
myFullPath = "c:\name_folder\" & myFile ' example of full path and filename
' set headers
Response.ContentType = "application/octet-stream"
Response.AddHeader "Content-Disposition", "attachment; filename=" & myFile
' send the file using the stream as
Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(myFullPath)
Response.BinaryWrite adoStream.Read()
adoStream.Close
Set adoStream = Nothing
%>
文件:HTML
<a href="DOWNLOAD.ASP?File=result.xls">Download Excel file</a>
此示例完全使用本机浏览器 Safari 与 Ipad 一起工作。该文件Result.xls
被下载并加载到查看器中,但无法进行编辑。
我的 iPad 用户使用 App QuickOffice 让文件保存在虚拟文件夹中,重命名文件,删除,......但他们无法编辑文件,该应用程序仅用于管理文件,不需要下载文件。
如果您的用户还需要在 iPad 上编辑 XLS 文件,我建议使用(例如)Google App Document
,它允许用户直接在浏览器中编辑和管理文件。
希望有帮助