Fetch SP Data From SQL Server to Excel in Excel

This item was filled under [ SQL Server, Tips and Tricks ]

If you are planning to get data from SQL Server to excel by using Excel External Data feature. Please follow the follwing steps :

1.  Set all steps by choosing any table.

2. Go To Refresh button > Connection Properties > Definition Tab

3.  Change the Command Type to SQL  and put the command “EXEC databasename.ownername.StoredProcedurename”

You are done.

Also if your Stored procedure is using temporary table remember to “SET NOCount ON” in the beginning of the stored procedure.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Comment on “Fetch SP Data From SQL Server to Excel in Excel”

Trackbacks

  1. GORDON

Leave a Comment