Displaying Resultset output in Excel format in a NEW window

Discussion in 'ASP General' started by Sushmita, Sep 25, 2003.

  1. Sushmita

    Sushmita Guest

    Hi,

    I have written an ASP script that connects to a database
    and runs a stored procedure and displays the results in
    text format ...using the <TABLE> tag. But I would like to
    have these results appear in a NEW Window in an Excel
    format.

    I used :

    <%
    Response.ContentType = "application/vnd.ms-excel"
    Response.Buffer = true
    Response.Clear
    %>

    This opens up Excel in the same window and usually does
    not refresh my data ...even though the stored procedure is
    actually running on the database server.



    Please help!!

    thanks.
     
    Sushmita, Sep 25, 2003
    #1
    1. Advertising

  2. Sushmita

    Bob Barrows Guest

    You can't open a new window in server-side code. It's just not possible. You
    will need to use client-side code to achieve this. Please see a dhtml
    newsgroup (or m/p/scripting.jscript).

    Bob Barrows

    Sushmita wrote:
    > Hi,
    >
    > I have written an ASP script that connects to a database
    > and runs a stored procedure and displays the results in
    > text format ...using the <TABLE> tag. But I would like to
    > have these results appear in a NEW Window in an Excel
    > format.
    >
    > I used :
    >
    > <%
    > Response.ContentType = "application/vnd.ms-excel"
    > Response.Buffer = true
    > Response.Clear
    > %>
    >
    > This opens up Excel in the same window and usually does
    > not refresh my data ...even though the stored procedure is
    > actually running on the database server.
    >
    >
    >
    > Please help!!
    >
    > thanks.
     
    Bob Barrows, Sep 25, 2003
    #2
    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. =?Utf-8?B?Tm92aWNl?=
    Replies:
    2
    Views:
    6,666
    Alan Ferrandiz Langley
    Jun 9, 2004
  2. Matt
    Replies:
    2
    Views:
    13,989
    bruce barker
    Aug 23, 2004
  3. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,526
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  4. Charts

    output parameters not working in if return resultset

    Charts, Nov 2, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    3
    Views:
    419
    Steven Cheng[MSFT]
    Nov 4, 2005
  5. Replies:
    1
    Views:
    157
    Craig Kim
    May 23, 2006
Loading...

Share This Page