Originariamente inviato da michele.santoro
Ho questo piccolo esempio:
codice:
<%
Response.ContentType = "application/msexcel"

'INTESTAZIONE
strXls = chr(34) & "Nome" & chr(34) & ","
strXls = strXls & chr(34) & "Acquisti" & chr(34) & "," & VbCrlf

Set conn = Server.CreateObject("ADODB.Connection")
sql = "SELECT * FROM Clienti ORDER BY id DESC"
dsnpath = "DRIVER={MICROSOFT ACCESS DRIVER (*.mdb)}; "
dsnpath = dsnpath & "DBQ=" & Server.MapPath("DBUtenti.mdb")
conn.open dsnpath

Set rs = Server.CreateObject("ADODB.Recordset")
Set Rs=Conn.Execute(SQL)

Do Until RS.EOF
    strXls = strXls & chr(34) & rs("Nome") & chr(34) & ","
    strXls = strXls & chr(34) & rs("Cognome") & chr(34) & "," & VbCrlf
    rs.MoveNext
loop

set rs = Nothing
conn.Close
Set conn = Nothing

'INVIO AL BROWSER
Response.write strXls
%>
Grazie mille!Ora me lo studio per bene, ciao!!!!