Alteryx Designer Desktop Discussions

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

Running multiple xlsx files in one workflow

jogayon001
7 - Meteor

Hi everyone, 

 

I have like 30 files of the same format/template and I want to execute each one of them in the same workflow. I created a simple wf just for me to validate that this concept is doable. 

jogayon001_1-1580549656582.png

 

I have read about macros however, right now I am struggling to create one. 

The goal is to run multiple files in this workflow and create output in xlxs format for each. 

 

Hope someone in the community could assist so I can have a clearer understanding this inquiry. 

 

Thank you

7 REPLIES 7
JosephSerpis
17 - Castor
17 - Castor

Hi @jogayon001 this article will help depending if the data is exactly the same in terms of columns and schema you might be able use the first two methods otherwise you will need to use a batch macro. 

echuong1
Alteryx Alumni (Retired)

If the files have the exact same format/schema, you can actually just use a wildcard character (*) in your input data tool. You can replace the entire file name or part of it if you want it to find a certain file name. 

 

For example, if you wanted to pull all files in your folder, you can use the following:

C:\Users\jogayon001\Documents\AlteryxWF\Test\*.xlsx

 

If you wanted to pull all files in your folder that start with the word book, you an use the following:

C:\Users\jogayon001\Documents\AlteryxWF\Test\Book*.xlsx

 

If the schemas are different, you can build a batch macro with a parameter that changes the input file. The workflow that feeds into this would need to contain the full path of the files you're bringing in. See attached for an example.

jogayon001
7 - Meteor

Hi 

 

 

 

kelsey_kincaid
12 - Quasar

Hi @jogayon001 ,

If you use the wildcard, but output the full path as a field in the input tool then you can use that field to save out separate files in the xlsx format you're wanting. So, even though the data pulls in stacked together it will output separately.

 

Settings on Input Tool:

kayers_0-1580753090364.png

 

Settings on Output Tool:

kayers_1-1580753151156.png

jogayon001
7 - Meteor

Hi @kelsey_kincaid

 

Thank you for the clarification. Its now clearer to me. 

 

I have one more concern on this sample workflow. So my input data is located in Folder A and I configured my ouput data tool to Folder B. However everytime I run the wf all my input files are overwritten and everything is saved in Folder A. I need the output files in Folder B.

 

Would you know how to fix? 

Here are the config for both tools. 

 

jogayon001_0-1580868680007.png

 

jogayon001_2-1580868762128.png

 

Regards. 

fmvizcaino
17 - Castor
17 - Castor

Hi @jogayon001 ,

 

Since you want to save in a different folder, you can get only the filename from your input data tool.

fmvizcaino_0-1580869167173.png

 

And in your outputdata tool, since you have already configured to save in a different folder, you need only to update the filename, not the entire path.

fmvizcaino_1-1580869234969.png

 

That way, you will change the filename but not the path where it is saved.

 

Best,

Fernando Vizcaino

jogayon001
7 - Meteor

Thank you @fmvizcaino  its now working even without the use of macro. 

 

Also thank you to @kelsey_kincaid @echuong1 . You guys are awesome.

Labels