Alteryx Designer Desktop Discussions

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

Batch macro output

jillian
8 - Asteroid

I want to run several files through a batch macro and have the output of each file spit out into different tabs within the same workbook. I got this to kind of work out by selecting "Take file/table name from field" in the output tool. However, it only does this for the files that have exact matching headers. For example is the headers for those files are A, B, C it would create tabs for those files. If the files don't have headers that match, the workflow won't even run those files. I have figured that Alteryx is reading the files and summarizing those with exact matching headers and then spitting it into different tabs. Is there a way to rewrite the workflow so that it reads each files individually and then spits it out into its own tab?

3 REPLIES 3
CharlieS
17 - Castor
17 - Castor

Sure! In the other thread, I suggested using an Input tool rather than a Dynamic Input so that different field schemas don't cause problems. On that Input tool, also select the option to "Output File Name as Field" so you have that value to use in the next step. Use a Formula tool to write a output path that includes a common output file name, and a sheet name that is unique to each input file. The Output tool should be configured to "Take File/Table Name From Field".

 

The Output tool should be inside the batch macro so that each sheet is written and the records never have to be combined before the output. Here's what the batch macro should look like:

 

20190206-BatchSheets.png

jillian
8 - Asteroid

@CharlieS Thank you so much!! This worked perfectly!

macst245
8 - Asteroid

Would you be able to save this workflow and share it with the formula you used for the sheet creation?

Labels