How Excel file is generated?

A

Abhishek

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.
 
D

Dave Anderson

Abhishek said:
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.
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top