Start Free Trial

Alteryx Designer Desktop Discussions

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

Connecting to folder with multiple files

rterry
6 - Meteoroid

Hello Alteryx Fam -

 

I am trying to connect to a folder with multiple excel files. All with the same columns headers, but different sheet names.

 

There are 9 files in the folder all with headers of the snippet attached. I would like to bring in this data and append it all in one place

 

Alt snippet.PNG

6 REPLIES 6
binuacs
21 - Polaris

@rterry One way of doing this is with the batch macro. Attaching a sample workflow for your reference

 

1. The first batch macro will read all the sheet names from the given folders

2. The second batch macro then will combine all the sheets data

 

binuacs_0-1678804978145.png

 

 

rterry
6 - Meteoroid

I cannot download the sample workflow. My company has it blocked.

 

 - So I have the directory tool pointed to the folder. Do I need the change anything in the "Directory" or "File Specification" configuration box?

 

- How do I add the 2nd tool that looks like it doesn't have a name? I am assuming that is the batch macro.

 

 


Thank you in advance for you help on this!

binuacs
21 - Polaris

@rterry below is the configuration for the directory tool, and you are correct the second tool is the batch macro which pulls all the sheet names from the given excel files with the full path name

 

binuacs_0-1678806315696.png

 

Are you familiar with the batch macro?

rterry
6 - Meteoroid

Okay - my directory tool is set up accordingly.

 

I am not familiar with the batch macro. I have never heard of it until you mentioned it

OllieClarke
15 - Aurora
15 - Aurora

@rterry if the sheets in the files are all of the same schema, then you can use a dynamic input tool instead of @binuacs's batch macros.

OllieClarke_0-1678807848853.png

The first dynamic input reads in the sheets within all excels

OllieClarke_1-1678807920323.png

We then create a new fullpath by replacing the <List of Sheet Names> with the actual sheet names

And then we can read in all the sheets from all the excels using the second Dynamic Input

OllieClarke_2-1678808018065.png

 

This approach works when the schemas of the sheets and the files are all identical, otherwise you'll need @binuacs batch macro approach.

 

Hope that helps,

 

Ollie

 

 

 

 

 

binuacs
21 - Polaris

@rterry  For the next tool you need to know how to create a batch macro. There are so many posts and videos available in this community about the batch macro. if your company blocks the attachments there is no way I can send you one. After going through those posts try to create one, if not let me know I can explain it to you so that you can follow the same

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...

Labels
Top Solution Authors