Modificare il file:
\dblist\excel_export.asp
<% @Language = "VBScript" %> <% Option Explicit Response.Buffer = True '---------------------------------------------------------------------------------------- '- ASP dbList - Version 8.1 - 30 July 2005 '- Copyright © 2005 - Livio Siri (http://www.livio.net) - All Rights Reserved. '---------------------------------------------------------------------------------------- Response.ContentType = "application/vnd.ms-excel" Response.AddHeader "Content-Disposition", "attachment;filename=dblist.xls" %> <!-- #include file="adovbs.inc" --> <!-- #include file="adolib.inc" --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#F0F0F0" vlink="#48576C" link="#48576C" alink="#000000"> <% Dim Connection, dsn dsn = request.querystring("objConn") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open dsn Dim RS, SQL2, totalfields, item, arrAllData, totalrecs, rowcount, colcount, strSQL, excludedItem(), itemCnt strSQL = Request.Querystring("strSQL") Set RS = Server.CreateObject("ADODB.Recordset") RS.Open strSQL, Connection, 3, 3 totalfields = rs.fields.count response.write "<table border=0><tr><td colspan=2>" response.write "Created: " & Date & " " & Time response.write "</td></tr></table>" response.write "<table border=1><tr>" itemCnt = 0 For each item in rs.fields response.write "<td><b>" & item.name & "</b></td>" Redim Preserve excludedItem(itemCnt) if IsExcluded(item.type) then excludedItem(itemCnt) = true else excludedItem(itemCnt) = false end if itemCnt = itemCnt + 1 Next If not RS.eof then arrAllData = RS.getrows totalrecs = RS.recordcount End If response.write "</tr>" If totalrecs = 0 then response.write "<tr><td colspan=" & totalfields & ">No data was returned</td></tr>" Else For rowcount = 0 to totalrecs - 1 response.write "<tr>" For colcount = 0 to totalfields - 1 if excludedItem(colcount) then response.write "<td>Unknown</td>" Else response.write "<td>" & arrAllData(colcount, rowcount) & "</td>" End if Next response.write "</tr>" Next End If response.write "</table>" RS.Close Set RS = Nothing Connection.Close Set Connection = Nothing %> </body> </html>
[
Íàçàä
]