Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old May 22nd, 2006, 01:15 PM
Abhishek
Guest
 
Posts: n/a
Default How Excel file is generated?

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.


  #2  
Old May 22nd, 2006, 05:25 PM
Dave Anderson
Guest
 
Posts: n/a
Default Re: How Excel file is generated?

Abhishek wrote:[color=blue]
> 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.[/color]

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.


[color=blue]
> 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?[/color]

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.


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles