Excel Import using DTS

  • Hi guys,

    I am trying to import data from excel file... the name of the file is used as a variable and I am trying to import the file; however, the transformation fails as the sheet name is differnt... What is the best way to work around this? May active-x script can help... I guess I have change the sheet name or somehow tell the dts to pick sheet1 regardless of name...

    Thanks in advance for response.

  • It sounds like you have posted in the wrong Section.

    If you mean DTS you should be in the SQL Server 2000 section. In SSBIDS you choose the name of your sheet in the Excel Source Editor or set it through the use of Expressions (or the Script Component).

  • Simple way is to use Import \ Export wizard.

    Right click on the db and select Import \ Export wizard.

    In the source , select the excel file

    In the destination, select the database then specify the table to be imported

    thats it

  • Any import will fail if someone has the sheet open... in my opinion, best way to do this is to make a macro on the spreadsheet to export the correct data to a Tab delimited file and import that, instead.

    --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 4 posts - 1 through 4 (of 4 total)

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