Delete records from Excel file before Transform Data Task

  • I'm a DTS novice and I'm creating a DTS to import an Excel file into SQL which should be really easy but...I need to delete the first 7 records from the Excel file before the transform data task.  I've tried setting first row to 8 on the options tab but it's not doing anything.  BTW - Excel is not loaded on the server does this matter?

    Thanks in advance for the help.

     

  • What are you setting [Last Row] to?

  • Are using a sheet reference, or named range? If you're using a named range, make sure that this range is defined properly.

    Also, if you need to do fancy footwork in select rows from Excel, consider creating an Excel linked server; this way, you can execute T-SQL statements against your spreadsheet from either DTS or a stored procedure.

    No, Excel does not have to be installed on the server: the server does not instantiate Excel in opening an Excel source; rather, it merely opens the spreadsheet via the OLEDB Jet provider.

    Hope this helps.

    - - Herb

  • Thanks Herb -

    I have last row set to 3000 (there are about 2700 records in the Excel file).  I am not using a named range.  How do I create an Excel linked server?

    Thanks so much!

    Erin

  • I found the info in the help file on how to add an Excel linked server, it looks like you might need to set a named range to refer to the data though...I can't physically open the Excel file and do this b/c it's being dropped to a server and we want to automatically suck it up into Excel.

    Any thoughts?

    Thanks!

Viewing 5 posts - 1 through 4 (of 4 total)

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