How Excel file is generated?

Discussion in 'ASP General' started by Abhishek, May 22, 2006.

  1. Abhishek

    Abhishek Guest

    Hi,

    I am exporting data from ASP page to an excel sheet using the following
    code.

    Response.AddHeader "Content-Disposition", "attachment;filename=ExcelView.xls"
    Response.ContentType="application/vnd.ms-excel"

    I have two questions.

    1. How the excel file gets created on the server before it is sent to the
    client.
    2. Is there any prerequisite for exporting the data to excel? I mean do we
    need to install any software like MS office on to the server?

    Thanks.
    Abhishek, May 22, 2006
    #1
    1. Advertising

  2. Abhishek wrote:
    > I am exporting data from ASP page to an excel sheet using the
    > following code.
    >
    > Response.AddHeader "Content-Disposition",
    > "attachment;filename=ExcelView.xls"
    > Response.ContentType="application/vnd.ms-excel"
    >
    > 1. How the excel file gets created on the server before it is
    > sent to the client.


    It probably doesn't. When the browser sends those headers, the client
    handles the file based on its installed software. But the file is almost
    certainly a simple HTML table. When Excel open the file, it converts it into
    a spreadsheet.



    > 2. Is there any prerequisite for exporting the data to excel?
    > I mean do we need to install any software like MS office on
    > to the server?


    Not if you are just sending a table. There are ways to do it with Office
    (not recommended) or Office Web Components (recommended) installed, but
    neither is required if a simple table will do.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.
    Dave Anderson, May 22, 2006
    #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. Luis Esteban Valencia
    Replies:
    1
    Views:
    1,380
    Carl Prothman [MVP]
    Jan 12, 2005
  2. Swathi
    Replies:
    1
    Views:
    383
    Scott Ellsworth
    Sep 26, 2005
  3. Replies:
    1
    Views:
    1,794
    extentechjohn
    Nov 21, 2006
  4. Replies:
    0
    Views:
    413
  5. =?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,499
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
Loading...

Share This Page