By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,996 Members | 892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,996 IT Pros & Developers. It's quick & easy.

Export records to multiple worksheet under 1 workbook

P: n/a
Hi,
I would like export the records retrieved from database to excel
worksheets. unfortunately, each worksheet will support until 65535
records and I have about 1 million of records to write. So I have to
write into few worksheets in the same workbook. But I cant get the way
how to do it. I manage to create the new worksheet in my workbook but I
cannot write content into it. How can I do so?

Below is the example output source (test.asp):
<%@ Language=VBScript %>
<%Response.Buffer=true%>
<%
Response.ContentType = "application/vnd.ms-excel"
%>

<HTML xmlns:x="urn:schemas-microsoft-com:office:excel">
<HEAD>
<style>
<!--table
@page
{mso-header-data:"&CMultiplication Table\000ADate\: &D\000APage
&P";
mso-page-orientation:landscape;}
br
{mso-data-placement:same-cell;}

-->
</style>
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>Sample Workbook</x:Name>
<x:WorksheetOptions>
<x:Print>
<x:ValidPrinterInfo/>
</x:Print>
</x:WorksheetOptions>
</x:ExcelWorksheet>
<x:ExcelWorksheet>

<x:Name>Sample Workbook 3</x:Name>
<x:WorksheetOptions>
<x:Print>
<x:ValidPrinterInfo/>
</x:Print>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><![endif]-->
</HEAD>
<Worksheet ss:Name="Sample Workbook">
<Row>
<c1>1</c1>
<c2>a</c2>
<c3>11.06.2003</c3>
</Row>
<Row>
<c1>2</c1>
<c2>b</c2>
<c3>12.06.2003</c3>
</Row>
</Worksheet>
<Worksheet ss:Name="Sample Workbook 3">
<Row>
<c1>2</c1>
<c2>b</c2>
<c3>11.06.2003</c3>
</Row>
<Row>
<c1>3</c1>
<c2>c</c2>
<c3>12.06.2003</c3>
</Row>
</Worksheet>
</HTML>

The records jus can write into Sample Workbook and not writing into
Sample Workbook 3. Can I know why?

This is urgent and I need help.

Thank you.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.