Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Browse a folder with multiple files with same column names, generate a single file output

smogulothu
5 - Atom

Hey everyone,

 

My scenario: I'm trying to use the "Folder Browse" tool to allow user's choice for folder selection, and the folder will have multiple excel files say input1, input2, input3 where all these files have same columns say ID, Name, Contact, Result. I want to perform a specific task let's say "sort by descending" on the data from all these 3 input files, perhaps in a loop, and finally generate a single output file with all the data combined and summarized in a way that the 3 files data can be differentiated in that final excel output file.

 

Can someone help me with creating such a scenario?

2 REPLIES 2
MattBSlalom
11 - Bolide

Since you're using the Folder Browse tool, you're inherently creating an App vs a standard Workflow (just want to call that out for others that may come across this post).

 

The Input Data tool handles this scenario beautifully since you specified that all the Excel files have the same structure (fields).  We need to configure the Input Tool's path to point to any Excel file rather that a specific name, so update the file name portion of the path to use a wildcard like "*.xlsx".  Also update the "Output File Name as Field" option on the Input Tool to be "File Name Only" or "Full Path" (whichever you'd rather see in your results). 

MattBSlalom_1-1617051515106.png

 

 

Then use an Action Tool between the Folder Browse & Input Tool to replace just the folder path portion of the File path on the Input Tool (leaving the wildcard file name & sheet name as configured directly in the Input Tool).

MattBSlalom_2-1617051621515.png

 

 

 

The Input tool will read the data (all in one pass, no looping) from all files matching the wildcard file name with the specified sheet name in the user provider folder path.  Then just add your desired transforms (like a Sort), and Output the results to your desired location.

 

MattBSlalom_0-1617051401338.png

 

smogulothu
5 - Atom

Awesome, that was very resourceful, thank you so much for your assistance!!!

Labels
Top Solution Authors