Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to export data to excel

Status
Not open for further replies.

H2

Programmer
May 17, 2001
24
0
0
HK
Hi,
please tell me how to export data from database to excel file by ASP?

thanks
H2
 
There are nuerous ways to do this...the two most common are:
Get the data from SQL into Excel via ADO
or
Get the data into recordset structures and pass that data into an Excel template file
 
Can you tell me more details for the second method (Get the data into recordset structures and pass that data into an Excel template file)?
thanks :)
 
Use standard ADO techniques for getting the data to your ASP layer then invoke an instance of Excel(must be installed on the server) opening the template and inserting the data into a pre-defined cell range….you can hang charts and graphs off this data range…or do anything you want with it via macro’s etc….

cheers
 
hi
if excel isn't available on the server (can be the case with IIS servers)
then you can setup a csv.dsn (Microsoft Text Driver)
you can then use ADO to operate on comma delimetered files. these can be
be moved to the client and opened in excel
phil
 
i have also done this - created a xls (excel 97) from sql server 7.0 via ASP. however i am having huge performance problems..

any suggestions?
thanks in advance
 
Is there a way to do this and have each column formatted? I have tried it with VBA, and excel opens, but there is no data.
 
Is there a way to have the client's version of Excel programatically open in order to display the newly created spreadsheet without programatically saving it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top