create excel from DB??

D

Dave

I do not get an error, but I also do not get any data in the excel file. I
know it is connecting to the db

<!--#include file="../db.asp"-->
<%

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

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<%
OpenDatabase dbc
set objrs = server.createobject("ADODB.Recordset")
SQL = "select * from title"
Set objrs=dbc.execute(SQL)
%>
<TABLE BORDER=1>
<TR>
<%
For i = 0 to objrs.fields.count - 1


%>
<TD><% = objrs(i).name %></TD>
<% next %>
</TR>
<%

while not objrs.eof
%>
<TR>
<% For i = 0 to objrs.fields.count - 1
%>
<TD VALIGN=TOP><% = objrs(i) %></TD>
<% Next %>

</TR>
<%
objrs.MoveNext

wend

%>

<body>

</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top