Export records to multiple worksheet under 1 workbook

Discussion in 'ASP General' started by Dayron, Aug 24, 2004.

  1. Dayron

    Dayron Guest

    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.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Dayron, Aug 24, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. saket
    Replies:
    0
    Views:
    469
    saket
    Jan 4, 2006
  2. Girija T
    Replies:
    0
    Views:
    152
    Girija T
    Sep 14, 2005
  3. Replies:
    1
    Views:
    1,034
    Prasad, Ramit
    Feb 16, 2012
  4. Katja
    Replies:
    1
    Views:
    217
Loading...

Share This Page