Reputation: 1
Using SSIS, uploading from an EXCEL file to SQL Server database table, I need to add the EXCEL file name as a column in the results dataset. I am able to create an EXCEL FILE source, get the data from the EXCEL, and load it into an OLE DB Destination but I am missing the step to add the filename to the dataset.
Upvotes: 0
Views: 736
Reputation: 5594
Most files like this are loaded through a foreach loop where you are looking in a folder for a file that matches a pattern... d:\data*.xlsx for example.
In that foreach you are saving the the path to a variable.
In the data flow you can add a derived column and add that variable to your data flow and ultimately to the database.
Upvotes: 0