Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Combining the Excel files with number of sheets

ravikumar060987
8 - Asteroid

Dear All,

 

I have a situation, in a folder have 30+ xlsx files. Need to combine all and where each excel file has 2 sheets.

Sheet 1: Summary - not to combine
Sheet 2: Actual Data (Which has 12 common headers across all the 30+ files).

 

How can I do this in Alteryx without using a macro?

 

 

11 REPLIES 11
ShankerV
17 - Castor

Hi @ravikumar060987 

 

Please use the directory tool, this will bring in the path of all 30+files and file names.

Then use Dynamic input tool by selecting the actual data from Sheet 2 will be sourced.

By this you can eliminate the sheet Summary to be read in the input.

 

Many thanks

Shanker V

ShankerV
17 - Castor

@ravikumar060987 

 

Hope this helps!!!!

 

ShankerV_0-1670912725088.png

 

ShankerV_0-1670914487571.png

 

 

Please let me know if you have any questions.

PanPP
Alteryx Alumni (Retired)

Hi @ravikumar060987 

 

You can use an input tool with a wildcard character.

 

If they have a similar naming convention, you can copy that directory and format the Input tool to contain a .xlsx file extension after selecting one of the excel files and picking a sheet. 

 

Input 30 sheets.png

 

 

Hope this helps. If it does please like the post and mark it as a solution.

binuacs
21 - Polaris

@ravikumar060987 One way of doing this with the batch macros

 

binuacs_0-1670915712186.png

 

ravikumar060987
8 - Asteroid

Post that - how can I combine all the data. can you pls share that too.

binuacs
21 - Polaris

@ravikumar060987 The batch macro will be combining all the records into one excel, you need to add an output tool after the second batch macro and configuration

binuacs_0-1670922396399.png

 

ravikumar060987
8 - Asteroid

@ShankerV - Can you please share the next step too. How can I combine the data's?

ShankerV
17 - Castor

Hi @ravikumar060987 

 

Taking an example to explain how to combine the data.

 

I have created some samples to explain.

 

Created 2 test files.

ShankerV_0-1670949498210.png

Test1 sheet2 contains the below data's

ShankerV_2-1670949601504.png

 

 

Test 2 Sheet2 Contains as below.

ShankerV_3-1670949641711.png

 

 

ShankerV
17 - Castor

Hi @ravikumar060987 

 

Please find the expected output.

 

ShankerV_0-1670949728906.png

 

 

The below workflow helps to get the expected output:

ShankerV_1-1670949774687.png

 

 

Labels
Top Solution Authors