sql server - Foreach Container to loop through Multiple Excel File to load -


i have had packages in past looping through multiple text files in folder , loading sql server tables.

now asked create package loop through multiple excel files in folder , load them sql server table.

i went through following steps create package assuming shouldn't different have in other packages loops through multiple flat file.

  1. added execute sql task, truncating staging table, simple truncate table statement.
  2. added foreach loop container. selected foreach file enumerator , created variable called file_path data type string. enter image description here
    enter image description here

  3. added data flow task.

  4. added excel data source. , configured excel connection manager selecting 1 'excel' file in destination folder. (at point configured correctly not showing red cross or warring messages.)
  5. then selected excel file connection manager , in properties windows under expressions, selected connection string property , used user variable @user::file_path.

enter image description here

at point excel data source showing red cross needs further configuration.

enter image description here

i have tried few things changing data access mode table name table name or view name variable, , passing variable @user::file_path gives me following error.

enter image description here

can please have , advice going wrong , how can fix this? advice or pointer in right direction appreciated.

thank you.

you shouldn't use expression on connectionstring property, on excelfilepath property.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -