Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Code to run a stored procedure from Excel

Status
Not open for further replies.

Modica82

Technical User
Jan 31, 2003
410
GB
Does anyone know any links/code/articles that i could use to run a stored procedure and return data to an excel spreadsheet??

Thanks,

ROb

---------------------------------------
 
Rob,
In which database is the stored procedure? (SQLServer, Oracle etc...)

Calling stored procedures is fairly standard and requires setting up an ODBC connection, connecting to the database and packaging SQL in the correct format to call the stored procedure.

As to getting data back, I would suggest that the stored procedure output the results to a table and then use Excel/VBA to query the table.

Hope that gives you a start.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top