SQLTeam.com | Weblogs | Forums

Multiple text files into one excel file

hi i have one doubt in ssis how to load multiple text fiels into one excel with file sheet name.
source files : C:\Users\ra\OneDrive\Desktop\New folder in ths path have 3 files : dept,emp,loc files
same data we need to export in single excel file dynamically.
if one folder have 3 text file then we need 3 sheets in single excel file dynamically
and sheet names should be text file name .

I tried like below : create variable 1) source folderpath :sourcpath: C:\Users\ra\OneDrive\Desktop\New folder 2)filename : emp.txt

then I drag and drop the foreachloopcontainer and insider selected foreachloopenumerator then select directrory mapping as sorucepath variable. 2)variable mapping is done with filename variable

after that drag and drop the text file and i configure the flatfilesource task and configure to excel destinaiton for emp here i am unable to load remail files due to columns are not matching with other files

could you please tell me how to achive this task in ssis