Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
monadel
Starting Member
3 Posts |
Posted - 2008-01-03 : 00:12:28
|
I need to run a SQL Server 2005 stored procedure by pressing a command button in excel 2003. Basically, I want stored procedures run from Excel to get the view/queries from sql.Searched and tried many solutions here and in other web resources, read about opening the datasource, but I cannot find the exact solution for my problem.Any help would be greatly appreciated,Thanks |
|
dev2dev
Starting Member
48 Posts |
Posted - 2008-01-03 : 07:13:58
|
its a VBA question dude, I am not sure this is appropriate to ask here, better try in VBA formsyou got to use adodb, this is how we do, not sure if there is any other way |
 |
|
Sara Karasik
Starting Member
10 Posts |
Posted - 2008-01-25 : 12:39:03
|
Create the stored procedure.Open excel. From the menu bar select Data --> get external data -- new database query.select the server name from the list of servers, and the database name. You will then be in MSQuery. In the SQL window type in EXEC MyStoredProcedure. While still in MSQuery, select file --> return data to excel.You can set the properties to refresh automatically, save the password, etc. |
 |
|
Siva_V
Starting Member
2 Posts |
Posted - 2009-09-29 : 07:01:15
|
quote: Originally posted by Sara Karasik Create the stored procedure.Open excel. From the menu bar select Data --> get external data -- new database query.select the server name from the list of servers, and the database name. You will then be in MSQuery. In the SQL window type in EXEC MyStoredProcedure. While still in MSQuery, select file --> return data to excel.You can set the properties to refresh automatically, save the password, etc.
This is a great Solution!!! thank you very much....SivaKumar |
 |
|
Siva_V
Starting Member
2 Posts |
Posted - 2009-09-29 : 07:06:49
|
quote: Originally posted by Sara Karasik Create the stored procedure.Open excel. From the menu bar select Data --> get external data -- new database query.select the server name from the list of servers, and the database name. You will then be in MSQuery. In the SQL window type in EXEC MyStoredProcedure. While still in MSQuery, select file --> return data to excel.You can set the properties to refresh automatically, save the password, etc.
This is a great Solution!!! thank you very much....SivaKumar |
 |
|
|
|
|
|
|