Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to store stored procedure result in excel file Expand / Collapse
Author
Message
Posted Friday, June 9, 2006 8:58 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 23, 2013 10:02 AM
Points: 1, Visits: 33
Hi, i am new to sql server 2000. I have created a stored procedure and i want to store results in an excel file. any help will be appreciated. Thanks in advance.
Post #286313
Posted Friday, June 9, 2006 9:19 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, July 25, 2014 8:47 AM
Points: 1,143, Visits: 1,270

There are several ways to store the output in excel.

The two easiest are

1. In query Analyzer set your Output to File and your ouput format to CSV (Tools->Options->Results will create a file you can open in Excel

2. Even easier is to set the output to Text and output format to Tab then select your output and paste into an open excel worksheet.

Other methods include writing an excel macro to connect to the SQL Server and execute the stored procedure - you can use the ADO connection, command and Recordset objects.

 

Good luck

 

S

Post #286322
Posted Friday, June 9, 2006 9:28 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Monday, July 7, 2014 1:06 PM
Points: 1,478, Visits: 1,025
Additionally you can use dts to call the stored procedure, and save as an excel file
Post #286326
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse