úsalo así:
sin usar JS
ni nada de nada mas que esto
tu pagina de enlace
Código asp:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 2</title>
</head>
<body>
<p><a href="exportar.asp" target="_blank">exportar.asp</a></p>
</body>
</html>
tu pagina asp llamada exportar.asp
Código asp:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>
<body>
<%
response.write "<table>"
response.write "<tr><td>hola mundo X1</td>"
response.write "<td>hola mundo X1</td>"
response.write "<td>hola mundo X1</td></tr>"
response.write "</table>"
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "content-disposition", "attachment; filename=Consulta.xls"
%>
</body>
</html>
suerte