excel stored procedure | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

excel stored procedure

I have a stored procedure that is running from within excel. I would like the parameters that get passed to this stored procedure to come straight from a cell reference. Is there a way to do this? Thanks, Ben
Yes if you are using a macro to run the sp. If I was doing this I would write a vba macro using ADO. Then build and execute an SQL string, something like: strSQL = "EXEC sp_myproc ‘" & Cells(1,1) & "’", ‘" & Cells(1,2) & "’" Cells(1,1) is A1
Cells(1,2) is B1 If your trying this through MS Query I think you will run into trouble…
thanks for the help, ben
]]>