Export records to multiple worksheet under 1 workbook

D

Dayron

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:eek:ffice: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.
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top