ExcelFilePath disappears after setting the ConnectionString dynamic (Expressions)

  • Hi,

    I have two similar SSIS packages and the other one works fine but the other does not.

    I have two template excel files in a dir and they are set as the source excels in the connection manager in each package respectively. Why do I have those templates is that at least for me, unlike with Flat File connections, the Excel-connections does not obey the 'DelayValidation = True' setting, instead there has to be the file present with the same name.

    This is not the cause of my trouble though.

    In the other package the ExcelFilePath disappears after setting the ConnectionString dynamic (Expressions). The other one works fine. I have tried to delete and do the connection again but no luck. I just don't get it. Could some one open my eyes please!

    Ville

    VisualStudio 2008

    Microsoft Visual Studio 2008

    Version 9.0.30729.4462 QFE

  • What do you mean with dissapears?

    What is the expression?

    Regarding the need for an Excel file to be present: unlike a flat file, you need to look at an Excel workbook as a database. The workbook is the database, the sheets are the tables. When you write data to a database, you'd expect the database and the tables to be there, don't you?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • The field clears...

    But I just remembered that I had a perfectly well working project with same kind of situation and with Excel sources you must have the ConnectionString expression in the format below:

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::CSVFile] + ";Extended Properties=\"EXCEL 8.0;HDR=YES\";"

    (I only had @[User::CSVFile] - this is painful that SSIS won't generate it in the format...)

    and

    in the Variables sheet ( SSIS / Variables menu) you must have the Value set to the existing template file:

    D:\kespro\input\DO_NOT_REMOVE_CustomerMasterTemplate.xls

    Ville

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

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