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.

Batch macros with Excel tabs

jgiacomazzi
7 - Meteor

My use of batch macros in Alteryx is limited. I know that a batch macro runs one time for each record in an input file and that an output is generated each time, and a union of the outputs is created. I am wondering if it's possible to create a batch macro that runs one time for each Excel tab in an input file. If so, how can I do this?

4 REPLIES 4
Luke_C
17 - Castor
17 - Castor

Hi @jgiacomazzi 

 

This is definitely possible, here are some links:

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Input-Multiple-Excel-sheets-with-a-...

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Read-in-Multiple-Excel-Files-with-M...

 

Typically you'll input the file and choose 'list of sheet names' and also opt to include the full path as the field. You can then update the full path to use the various tab names and pass those through to the batch macro. One key thing is knowing whether or not each tab has the same schema, which would impact your approach.

Jay-RDC
8 - Asteroid

1. You will need to configure the input data tool to return List of Sheet Names and output filename as field "FullPath". 

2. Create a new column or update the Filename field using a formula tool to replace the "<List of Sheet Names>" with the Sheetname column to get the exact path 

3. Create the macro connecting an action tool to update the Path from the Input Data tool.

jgiacomazzi
7 - Meteor

@Jay-RDC can you explain how to do step 3?

Labels
Top Solution Authors