Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%
response.buffer = true
set con = server.createobject("adodb.connection")
con.open <connection method>
Set RS = Con.Execute("select * from whatevertable")
dim exceloutput(0)
exceloutput(0) = ""
'generating field name headers
for each field in rs.fields
exceloutput(0)= exceloutput(0) & """" & field.name & ""","
next
'this next line ( and ones later ) are for delimiting records
'the commas are for delimiting columns
'would be "nice" to patch this up after to take out the last comma
'cause that leaves a dud final column
exceloutput(0)= exceloutput(0) & vbcrlf
do while not rs.eof
for each field in rs.fields
exceloutput(0)= exceloutput(0) & """" & rs(field.name) & ""","
next
exceloutput(0)= exceloutput(0) & vbcrlf
rs.movenext
loop
con.close
set rs = nothing
set con= nothing
Response.ContentType = "application/vnd.ms-excel"
response.write exceloutput(0)
response.flush
%>