Alteryx Designer Desktop Discussions

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

Use simple workflow on multiple files in same folder with separate outputs

jcholet
7 - Meteor

Hi all,

 

I have a simple workflow that inputs a CSV file, then outputs it as xlsx, using one of the field values to split data onto different tabs.  I would like to use this workflow on many identical-schema CSV files in a folder, outputting each file separately.

 

I can't seem to figure it out using macro tools or Directory and I'm stumped.  Is there a way to do this in Alteryx?  I can attach my little workflow if needed.

 

Thank you!

15 REPLIES 15
joshuaburkhow
ACE Emeritus
ACE Emeritus

One way you can do it is use wildcards in your input. Here is a great quick tutorial on how to do that 

 

https://www.youtube.com/watch?v=1y1gFXDkYwA

 

 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
jcholet
7 - Meteor

Thanks for the response!  That does a great job of importing them all.  Can I use wildcards to output individual files?  It is combining them all into one file but I need separate files.

echuong1
Alteryx Alumni (Retired)

To output to multiple files, use the option at the bottom of the output tool.

 

echuong1_0-1599224555896.png

 

This article has more info:

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Output-data-into-multiple-files/td-p/1...

jcholet
7 - Meteor

Thanks!  Yes, I am using that feature to put a field name on each tab of the output file.

 

What I would like is to have exactly one output xlsx file for each csv input file.  

echuong1
Alteryx Alumni (Retired)

The process for writing to multiple files is the same as multiple sheets. You'd use the entire path option. Reference the article mentioned for specific configuration.

jcholet
7 - Meteor

What I'd like is to write to multiple Excel files, based on the name of each input CSV file.  Then each output Excel file will have multiple sheets, each named for the value in a particular field.  Is this possible?

echuong1
Alteryx Alumni (Retired)

As far as I know, not by default. You may be able to do this using a batch macro.

 

Can you upload a copy of the data right before you need to output it? As well as the fields you'd like to use as the file name and sheet name.

jcholet
7 - Meteor

Sure!  Here is a sample CSV and what I'd like each xlsx file to look like.

jcholet
7 - Meteor

Sorry - to clarify, the file name coming in is the same as the file name I'd like to output - so it would be Sample1.xlsx for the output file.

 

The field I'm using to distinguish each tab is "Risk Gender" so in this case, there are four tabs in the output file, to match the four values present in that field in the input file.

 

Hope this helps!

Labels