import from excel via stored procedure

  • Hi,

    I think it's a very common case to import data from an excel file to sql server 2005 thru a stored procedure. There are many solutions solutions such as OpenDataSource methods, cmd call DTS packages etc.

    However i have not succeeded in find a receivable solution when the excel file is on the local machine. These methods work only if the file is at the same volume where the sql server is. But what happens if the excel file is at the local volume? I've searched to a lot of other communities but the result was nothing.

    The stored procedure as runs under the sql server environment doesn't see my local disk. Is there a way to allow my local disk to be recognized by the sql server environment which is allocated to server "server"?

    Thanks in advance

  • tkoletsis (11/28/2008)


    Hi,

    I think it's a very common case to import data from an excel file to sql server 2005 thru a stored procedure. There are many solutions solutions such as OpenDataSource methods, cmd call DTS packages etc.

    However i have not succeeded in find a receivable solution when the excel file is on the local machine. These methods work only if the file is at the same volume where the sql server is. But what happens if the excel file is at the local volume? I've searched to a lot of other communities but the result was nothing.

    The stored procedure as runs under the sql server environment doesn't see my local disk. Is there a way to allow my local disk to be recognized by the sql server environment which is allocated to server "server"?

    Thanks in advance

    You have to use a "UNC" with a machine name and "share" path AND Sql Server must be logged in as a Domain poweruser that can actually see the share.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply