We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Combining Multiple individual excel file in One Workbook

sriniprad08
11 - Bolide

Hi Team,

Hope you are well. 

I have 10 individual excel file. I need to combine all of them into one workbook with different tabs.

 

For e.g 

Individual excel file - A, B, C,D

Output - One workbook - E ( with A, B, C ,D ) as individual sheets.

 

Please let me know,

 

thanks,

Sri

39 REPLIES 39
binuacs
21 - Polaris

@sriniprad08 In that case you need another batch macro to get the sheet names first then another batch macro to combine all these sheets, one question all these excel sheets have the same number of columns and column names? 

binuacs
21 - Polaris

@sriniprad08 Updated the workflow and included another macro to read the sheet names first, then the next macro will combine all the sheets, I assume that all of your sheets are having same schema (Same columns heading)

 

binuacs_0-1670319254227.png

 

sriniprad08
11 - Bolide

Hi @binuacs ,

 

Thank you so much for the help. unfortunately all the headers in the excel file are not same.

This will be little difficult. @gautiergodard  The solution proposed by Gautier is working.

 

Cheers,

Sri

gautiergodard
13 - Pulsar

Hello @sriniprad08 

Happy to hear the solution is working!

Could you please accept the post that provided the answer as a solution to this post?

This will help others in the future who have similar questions find answers more efficiently.

 

Thank You!

binuacs
21 - Polaris

@sriniprad08 I updated the macro according to your requirement. Can you try to run the attached workflow and see you are getting the expected result or not?

 

binuacs_0-1670344950524.png

 

samson211
8 - Asteroid

@binuacs Hi sir, I am also trying to combine different excels into a single sheet, doesnt have same schema, any way forward?

binuacs
21 - Polaris

@samson211 The above batch macros should work on your use-case, just remove the first filter

samson211
8 - Asteroid

Let me check and get back, thanks btw for replying @binuacs 

samson211
8 - Asteroid

@binuacs I tried like this, it merging but firstly not all excels seems being getting pulled.

first, is there any way to add a column to know which files are getting putted?

second, is my workflow for macro as well as main workflow is both ok or do i need to do some tweaks/

 

sorry to bother i am a bit noob. TIA

samson211
8 - Asteroid

Using this it seems working, however I want to bring two things here.

 

1. Sometime sheet name might not be exactly same, so can I define a condition to pull data from like this named sheet , something like that.

2. If file name dont exisit just skip it. I think maybe already getting done.

3. I also want additional column, where it will give me name of the file from which the rows are getting picke.d

 

Labels
Top Solution Authors