In the past i'd a same scenario so what i did:
FILE: DOWNLOAD.ASP
<%
' get the file to download
myFile = request.querystring("File")
myFullPath = "c:
ame_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
%>
FILE: HTML
<a href="DOWNLOAD.ASP?File=result.xls">Download Excel file</a>
This example is full working with Ipad using the native browser Safari.
The file Result.xls
is downloaded and loaded in the Viewer whitout the capability to be edit.
My iPad users use the App QuickOffice to let the file be saved in a virtual folder, rename the file, delete, ... but they cant edit the file, that App is just for manage the files and isnt required for download the file.
If your user need also edit the XLS file on the iPad i suggest to use (for example) the Google App Document
, it let the user to edit and manage the file directly in the browser.
Hope it help
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…