SSIS package open excel sheet "Sheet1$" problem

  • I've developed a SSIS package to load data from SQL Server 2005 to Excel file. Basically it deletes the sheet (DROP TABLE), creates the sheet (CREATE TABLE) again and loads data to it. The reason I'm doing this is that I couldn't find a easy way to clear excel data before loading to it. It works pretty well for a few days. Then I got the error message:

    Opening a rowset for "sheet1" failed. Check that the object exists in the database

    When I opened the SSIS package with BIDS, I saw the connection has problem. The excel file has only a sheet named "sheet1$". I have to point the connection to "sheet1$". It worked for a while, then again I got error message saying that "sheet1$" doesn't exist. This repeated problem haunted me for a long while. Anyone has a clue about it?

    Thanks a lot!

  • as a work around, you can write a script task to copy over a blank spreadsheet to your connecting spreadsheet every time instead of clearing it down...

  • darth_vodka (3/15/2011)


    as a work around, you can write a script task to copy over a blank spreadsheet to your connecting spreadsheet every time instead of clearing it down...

    I second this - it's easy and works.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • My issue was that it's not "Sheet1" but "Sheet1$"

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

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