Importing Excel File

  • Hi Guys,

    I am looping through excel file by using the Foreach File enumerator. However after selecting the new Excel connection manager properties window, In the Property Expressions Editor I selected property as connection string and entered following expression.

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::BudgetFilePath] + ";Extended Properties=\"Excel 8.0;HDR=Yes\";"

    But excel is not loading it's giving me error message as there is no valid object. When I remove the expression it works fine.

    Can anyone shed some light on this issue.

    Thanks,

    Rahul

  • i would advise you to use ExcelFilePath instead of ConnectionString in your expressions.

    Are you getting this error when you tried to use it in a data flow task?

  • Also check that the BudgetFilePath variable has been set so that it points to a valid file so that SSIS's meta-data validation does not fail.

    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

  • Double-quote the variable like this:

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + @[User::BudgetFilePath] + "\";Extended Properties=\"Excel 8.0;HDR=Yes\";"

    Your path probably contains spaces.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

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

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