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 2008 Forums
 Transact-SQL (2008)
 Export to Excel from a Stored Procedure?

Author  Topic 

pizzazzz
Yak Posting Veteran

55 Posts

Posted - 2010-08-02 : 20:07:57
can you export a dataset or table to excel from a Stored Procedure? if so can someone point me in the right direction for the way to do this?

thanks!

konark
Yak Posting Veteran

60 Posts

Posted - 2010-08-02 : 20:41:20
Use sp_send_dbmail . You will need to create a db profile to send email from a stored procedure.

refer:
http://technet.microsoft.com/en-us/library/ms190307.aspx

Chandragupta Mourya

Takhyashila
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-03 : 02:05:17
to export table to excel you can use OPENROWSET or bcp

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-08-03 : 05:47:38
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -