Loading Excel files with SSIS with different names. Getting error 0x80004005

0

I have an SSIS package that looks through excel files with a date at the end of each file. I have watched many vidoes but can't find an answer. If I move the "original file" that I used with the connection manager(see link for screenshot) the package fails to complete with "Error: The GetEnumerator method of the ForEach Enumerator has failed with error 0x80004005 "Unspecified error". This occurs when the ForEach Enumerator cannot enumerate." If I then put the file back to the correct place it works again. My question is do I have to have the file there forever? Is there no way to do this and it not look for that file to exist?

Connection Manager Connection Manager

foreach
ssis
enumerator
asked on Stack Overflow Apr 29, 2021 by YosiPel • edited Apr 29, 2021 by billinkc

1 Answer

0

You are using static file names. If you are OK with using static file names, then you will have to have some other process update that file periodically. However, if you want to be more dynamic where the process loops over multiple files, then in the ForEachLoop Enumerator, you just set the following settings:

Note: using *.xlsx is the method for getting any file with the extension of xlsx.

enter image description here

You then map the file path to a variable:

enter image description here

You then set your Connection Manager's ConnectionString property to the file path:

enter image description here

answered on Stack Overflow Apr 29, 2021 by J Weezy

User contributions licensed under CC BY-SA 3.0