Run SQL Parameter Stored Procedure -- NO VBA
How is it possible using Excel 2007 to run a sql stored procedure which accepts 2 parameters and pass the parameters from a cell in Excel?  NO VBA.
September 4th, 2015 4:09pm

Hi,

Please read this article:

https://blogs.office.com/2010/06/07/running-a-sql-stored-procedure-from-excel-no-vba/

Steps:

Step 1: Data tab > From Other Sources -> From SQL Server 
Step 2: Enter Credentials. Your server name can be an IP address 
Step 3: Choose any old table or view. Pick a small one because well discard it later anyway.
Step 4: Excel will pop up the Import Data dialog box. Click Properties here (NOT THE OK BUTTON).
Step 5: Click on the Definition tab. There, change Command Type to SQL, and then enter your Stored Procedure name in the Command Text input. 
Step 6: Excel complains about something.blahblahblah. Click Yes (as in yes I know what Im doing). 
Step 7: Excel will activate the Import Data dialog box again. This time click OK to fire the Stored Procedure and return the results.
Step 8: Marvel at your results

Regards,

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 2:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics