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?
Hi @jgiacomazzi
This is definitely possible, here are some links:
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.
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.
@Jay-RDC can you explain how to do step 3?
@jgiacomazzi
Check out this one.
Download the macros and you can see how it can be done. 😁