Alteryx Designer Desktop Discussions

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

Help needed in batch macros

Govind_Dileep_G
8 - Asteroid

Hi all,

I have 2 excel files having 2 sheets in each of them. I want to make a batch macro so that it will pull all the data in sheet 1 of each workbook to one place  and data in sheet 2 of the work books in to a consolidated sheet 2. I know about wildcard and to use 2 input tools, I am doing this as part of my batch macro learning. I did many research and tried to form some macro but all of them were giving me various errors, mainly because the schema is different and the first sheets has 4 columns while the second sheet has 5 columns. I am attaching the files here. If anyone of you can guide me in forming a batch macro it would really help me a lot. 

Thanks in advance

 

7 REPLIES 7
apathetichell
19 - Altair

Go into interface designer and click on schema will differ union all iterations by name...

Govind_Dileep_G
8 - Asteroid

Thankyou for the reply @apathetichell , but can you be more specific. Since I am new to Alteryx I am finding difficulties. 

apathetichell
19 - Altair

Sure! Basically if you are getting an error for unmatching schema - then the problem is fixable by changing the interface designer options in Alteryx. ID is  a seperate screen that you can access via the view menu. the bottom menu shows output and that's what you'll need to change to allow unioning of different schema on different iterations.

 

Just an FYI - there are a few main ways to join sheets of the same name in different files:

 

1) union everything keeping the file/sheet names and then pull out matching sheet names.

 

2) pull in just matching sheet names on a select list and output them as matched.

 

I'd recommend 1) as number 2) requires knowing the subset of which sheets will have a match.

Govind_Dileep_G
8 - Asteroid

Thankyou @apathetichell , Can you provide any screenshot of the macro or share a workflow please?

 

atcodedog05
22 - Nova
22 - Nova

Hi @Govind_Dileep_G 

 

Is 2 sheets are merged into 1 how will you be able to use it. Can you provide an expected output.

Govind_Dileep_G
8 - Asteroid

I am sharing the expected output. Thankyou @atcodedog05 

atcodedog05
22 - Nova
22 - Nova

Hi @Govind_Dileep_G 

 

Wild card method is the right method for this. If you are using batch macro you would again need to handle each sheet separately since they need to go to different sheets. The expected output is only possible if you are outputting in the macro itself. Batch macro method maybe possible but it has no merits against wildcard in this usecase. Wildcard is the suggestable method for this usecase.

Labels