+ Reply to Thread
Results 1 to 2 of 2

call stored procedure from Excel 2007

  1. #1
    Registered User
    Join Date
    08-02-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    call stored procedure from Excel 2007

    I need to call a stored procedure from Excel that will return the result sets into my work sheet. My stored proc consists of 2 SELECT statements where the first statement always returns on result set and the second statements returns multiple rows as a result set.
    I need a button or user form maybe in which I can enter one parameter to pass to the stored procedure.
    I'm an SQL guy but my Excel/VB are somewhat poor . Has anybody done something like this before?
    Thanks

  2. #2
    Registered User
    Join Date
    12-07-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: call stored procedure from Excel 2007

    1-create connection to data
    - Data tab=> Get External Data=>From Other Sources=>From SQL Server=>Configure, pick any table
    2-modify Import Data properties
    -Import Data screen=> Properties=>Definition tab=>Command Type - Change Command Type: to SQL
    3-Put exec statement in Command Text: ie exec spTest @date='1/1/2010'

    Question - Does anyone know how to pass sp parameter (@date) from spread sheet for easier user entry?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1