Column out of sync error with excel data flow

  • I am attempting to set a connection string within an excel manager dynamically based on the latest file in a particular folder. Both the file name and sheet name is dynamic from file to file. I have two script tasks for two variables, one for the full file path for the connection string and the second for the sheet name. I have set "delay validation" to true on both the excel connection manager as well as the data flow task.

    When I execute I'm receiving the error: "external columns for Excel Source are out of synchronization with the data source columns".

    I cannot view the available columns in the excel data flow component because the sheet and file is determine during execution.

    I'm not sure where to go from here. Any assistance would be greatly appreciated.

    Thank you!

  • Are the column names exactly the same in all of the files?

    Is there exactly the same number of columns in all of the files?

    Are the columns in exactly the same order in all of the files?

    If the answer to any of the above is no, you will probably have to rethink your approach.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Yes the columns are the exact same, the only change is the file name and sheet name.

    I want to also make sure that I'm configuring the data flow correctly, due to the excel task not having an explicit file associated until run time, should I first manually browse to a file and figure the columns in the excel source and SQL destination tasks? Then update the excel task to an expression? Or is that even relevant?

  • J0shu@ (7/17/2013)


    Yes the columns are the exact same, the only change is the file name and sheet name.

    I want to also make sure that I'm configuring the data flow correctly, due to the excel task not having an explicit file associated until run time, should I first manually browse to a file and figure the columns in the excel source and SQL destination tasks? Then update the excel task to an expression? Or is that even relevant?

    Yes that's exactly what you should do. Put an Excel file somewhere that your process will never use, and create all of the meta data using that.

    If you like, the default (or initial) value of your expression can still point to this file, meaning that you do not need to worry about setting 'DelayValidation' either.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • That was the issue. Once I built the metadata with a template file the issue was resolved. I also found that I needed to set the "FirstRowHasColumnName" via expression once I updated the connectionstring as an expression but not a big deal. Thank you so much for the assistance!!!

  • No problem. Well done on getting it working.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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