nella mia paginetta asp voglio esportare i dati di un db in formato excel.
nel form che fa il post ho scritto:

<Form method="post" action="DATI.asp">
<p align="center">
<input type="submit" value="SALVA ELENCO IN EXCEL" name="categoria2" style="float: left"><input type="hidden" name="categoria2" size="16" class="normal8"></p>
</form>

mentre la pagina dati.asp contiene il seguente codice:

<%
Response.ContentType = "application/vnd.ms-excel"

Dim cn : Set cn = Server.CreateObject("ADODB.Connection")
Dim strConn
strConn = "driver={Microsoft Access Driver (*.mdb)};dbq="&_
server.MapPath("db.mdb")
Dim sql

cate2=Request.form("categoria2")

sql ="SELECT * FROM tabella1 where valore1='" & cate2 & "'"
cn.open strConn
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, cn, , , adCmdText %>
<TABLE BORDER=1>
<TR>
<%

col = 2

For c = 0 to rs.Fields.Count - 1
%>
<TD BGCOLOR=RED><% = rs(c).Name %></TD>
<% Next %>

</TR>
<%
Do While Not rs.EOF
%>
<TR>
<% For c = 0 to rs.Fields.Count - 1
%>
<TD VALIGN=TOP ><% = rs(c) %></TD>
<% Next %>

</TR>
<%
rs.MoveNext
col = col + 1
Loop
rs.Close
%>

IN PRATICA NON POSTA IL VALORE CATEGORIA2

vi ringrazio per l'aiuto