community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Batch Macro Multiple Files of same format

Hello,

 

I'm trying to build a workflow that filters for specified account numbers from an income statement. I have 15 files of the same set-up (same spreadsheet names and file formats) and I have been trying to build a batch macro to input all of the files at once into my workflow and pull out each account number from the same sheet from each individual excel file.

 

It's been driving me crazy so any help would be greatly appreciated!

Alteryx Certified Partner

Hi @lizleeking 

 

You may not need to build out a batch macro for this. The Input Data tool can be configured with wildcards so that it'll read in all files that match. The only caveat to this is if the table schema changes in any of the Excel sheets it's reading in, it'll skip that file (which is where a Batch macro would be needed).

 

In the example below, this would tell it to read any file that starts with "incomestatement and ends with ".xlsx" from the the directory "C:\directory\". The sheet name in each Excel file also has to match to use this option.

image.png

 

Outside of this, you may be able to find macros shared throughout Community or published on gallery.alteryx.com.

 

Hope this helps!

Jimmy
Teknion Data Solutions

Moderator
Moderator

Hello @lizleeking

Did @jrgo 's solution work?
If so, please mark his response as a solution so that others who face a similar issue know how they can troubleshoot!

 

Thanks,
TrevorS

Community Moderator
Labels