Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 Using Stored Procedure to Export data to Excel

Author  Topic 

Clay101
Starting Member

5 Posts

Posted - 2008-07-16 : 15:14:26
I have a stored procedure which runs a simple query on two tables.
What I would like to add to the stored procedure is the ability to create an Excel document from the information gathered and place the document on the desktop.

Ultimately what I am attempting to do is have user click on a link in a website that will run the stored procedure and save the excel document to the user’s desktop.

Can this be done? Any ideas how to go about it?

Thank you,

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-07-16 : 22:56:07
Maybe call bcp with xp_cmdshell in the sp?
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-16 : 23:00:10
Export to Excel ? Read this link fully


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -