I've got an SSIS package that is supposed to loop through the tabs of an xlsx file, extract data, and then move that file to an archive folder. It sounds simple enough, but I can't it to work.
I have a Foreach Loop container that gets a collection from a network drive and gives the file name to an EXCEL Connection Manager. The Connection manager is then used by a series of Data Flow tasks that get data from the tabs of the spreadsheet and insert them into a SQL Server db through another Connection Manager object.
Next, it is supposed to move the file to an \Archive directory when it is finished. I'm trying to use a File System Task to accomplish this, but it fails. The EXCEL Connection Manager does not appear in the Source Connection drop-down list, so I apparently can't use that. I have a variable that uses an expression to build the path\filename to use as the source. If I disable all of the Data Flow tasks in the Foreach Loop container, it will move/rename the file as it should. But when the Data Flow tasks are enabled, it goes through them and then fails with an error message that says it can't move the file because it is in use. There are constraints on the Data Flow tasks so each runs in series and then the File System task is after they are all done.
Is there something I need to do force it to close the connection and release the file after the last Data Flow?
Is there some other work around?
Thanks in advance!
_________
RottPaws
If you don't report a problem, I probably won't fix it.
I have a Foreach Loop container that gets a collection from a network drive and gives the file name to an EXCEL Connection Manager. The Connection manager is then used by a series of Data Flow tasks that get data from the tabs of the spreadsheet and insert them into a SQL Server db through another Connection Manager object.
Next, it is supposed to move the file to an \Archive directory when it is finished. I'm trying to use a File System Task to accomplish this, but it fails. The EXCEL Connection Manager does not appear in the Source Connection drop-down list, so I apparently can't use that. I have a variable that uses an expression to build the path\filename to use as the source. If I disable all of the Data Flow tasks in the Foreach Loop container, it will move/rename the file as it should. But when the Data Flow tasks are enabled, it goes through them and then fails with an error message that says it can't move the file because it is in use. There are constraints on the Data Flow tasks so each runs in series and then the File System task is after they are all done.
Is there something I need to do force it to close the connection and release the file after the last Data Flow?
Is there some other work around?
Thanks in advance!
_________
RottPaws
If you don't report a problem, I probably won't fix it.