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.
- added
execute sql task
, truncating staging table, simple truncate table statement. added
foreach loop container
. selectedforeach file enumerator
, created variable calledfile_path
data type string.
added
data flow task
.- added
excel data source
. , configuredexcel connection manager
selecting 1 'excel' file in destination folder. (at point configured correctly not showing red cross or warring messages.) - then selected
excel file connection manager
, inproperties
windows underexpressions
, selectedconnection string
property , used user variable@user::file_path
.
at point excel data source showing red cross
needs further configuration.
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.
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
Post a Comment