Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a classic ASP page hosted at GoDaddy that performs the following:

Executes a stored procedure from SQL Server

SET rsMemberDownload= conn.execute("EXEC [dbo].[sp_current_memb_excel_export]")


Then I create a HTML table that loops through the data and displays the information:
Response.Write "<table border='1' cellspacing='0' cellpadding='0'>"
Response.Write "<tr><th>First Name</th><th>Last Name</th><th>Full Name</th><th>Address</th><th>City</th><th>State</th><th>Zip</th><th>Home Phone</th><th>Work Phone</th><th>Cell Phone</th><th>Email</th><th>Birthday</th><th>Spouse</th><th>EAA Member ID</th><th>Interests, Etc.</th><th>Start Date</th><th>Years Active</th><th>EAA-Position</th><th>Membership Type</th><th>Name Tag Status</th></tr>"
Do While Not rsMemberDownload.EOF
Response.Write "<tr><td>"&rsMemberDownload("First Name")&"</td><td>"&rsMemberDownload("Last Name")&"</td><td>"&rsMemberDownload("Full Name")&"</td><td>"&rsMemberDownload("Address")&"</td><td>"&rsMemberDownload("City")&"</td><td>"&rsMemberDownload("State")&"</td><td>"&rsMemberDownload("Zip")&"</td><td>"&rsMemberDownload("Home Phone")&"</td><td>"&rsMemberDownload("Work Phone")&"</td><td>"&rsMemberDownload("Cell Phone")&"</td><td>"&rsMemberDownload("Email")&"</td><td>"&rsMemberDownload("Birthdate")&"</td><td>"&rsMemberDownload("Spouse")&"</td><td>"&rsMemberDownload("EAA Member ID")&"</td><td>"&rsMemberDownload("Interests, Etc.")&"</td><td>"&rsMemberDownload("Start Date")&"</td><td>"&rsMemberDownload("Years Active")&"</td><td>"&rsMemberDownload("EAA-Position")&"</td><td>"&rsMemberDownload("Membership")&"</td><td>"&rsMemberDownload("Name Tag Status")&"</td></tr>"
rsMemberDownload.MoveNext : Loop
Response.Wite "</table>"

'Stop Processing Page Now
Response.End

rsMemberDownload.CLOSE
SET rsMemberDownload= NOTHING
conn.CLOSE
SET conn = NOTHING


Prior to all of this code I include the following:

Response.ContentType = "application/vnd.ms-excel"
			Response.AddHeader "Content-Disposition", "attachment;filename=""EAAChapter309_PAID_"&Year(date)&"_.xls""" 	


When a user goes to the page using a windows machine, they automatically begin downloading an Excel file based on the output of this code.

However IF I am using an iPad to view this page I get nothing. How can I do ether of the following:

1) Automatically open up excel on the iPad if the user has it or let the user select which program they have in order to open it from their iPad.

OR

2) Automatically open up their default mail program and attach the spreadsheet to an email

Any help would be great.

What I have tried:

Just the code I've listed int he problem up above
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900