I am ok with creating an Excel spreadsheet from asp.
What I need to know is how can I create multiple pages?
My current code is something like this, and works fine, but all is returned on one page, I am performing a loop to create like spreadsheets from various database tables and each time I start back at the top, I would rather create a new worksheet and name it instead of simply creating another header on the single worksheet:
<%
Response.ContentType = "application/vnd.ms-excel"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "ASPWorkBook"
SQLString = "SELECT * FROM tblTable"
Set RecordSet = Conn.execute(SQLString)
%>
<TABLE BORDER=1>
<%
Do Until RecordSet.EOF
%>
<TR>
<TH><%=RecordSet("Name"%></TH>
</TR>
<%
Here is where the code for an embedded SQL String and loop for each worksheet in excel would reside.
%>
<%
RecordSet.MoveNext
Loop
%>
</TABLE>
I've made various attempts and all have failed. I am coding with vbscript. Any help would be greatly appreciated.
Thanks
bcapps
What I need to know is how can I create multiple pages?
My current code is something like this, and works fine, but all is returned on one page, I am performing a loop to create like spreadsheets from various database tables and each time I start back at the top, I would rather create a new worksheet and name it instead of simply creating another header on the single worksheet:
<%
Response.ContentType = "application/vnd.ms-excel"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "ASPWorkBook"
SQLString = "SELECT * FROM tblTable"
Set RecordSet = Conn.execute(SQLString)
%>
<TABLE BORDER=1>
<%
Do Until RecordSet.EOF
%>
<TR>
<TH><%=RecordSet("Name"%></TH>
</TR>
<%
Here is where the code for an embedded SQL String and loop for each worksheet in excel would reside.
%>
<%
RecordSet.MoveNext
Loop
%>
</TABLE>
I've made various attempts and all have failed. I am coding with vbscript. Any help would be greatly appreciated.
Thanks
bcapps