Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Run a workflow on multiple files and output the result separately for each input file

rohan_tibarewala
9 - Comet

I need to run the same workflow on multiple files saved in a folder and write the output separate for each of those input files.

I have found a batch macro which can read all the files and run the workflow on it, but the issue is that it is producing a single output with the results of all the input files unioned together.

Please advise a solution !

14 REPLIES 14
rohan_tibarewala
9 - Comet

Hi Tarun,

 

Can you confirm in which tool you are adding the file extension?

There should not be any problem if you add ".xlsx" as file extension in Directory tool of the parent workflow. 

If you can share the workflow or screenshot i can try to look into the issue. What is the error message you see?

 

Thanks,

Rohan. 

 

TarunDeep
8 - Asteroid

Hi,

I get the following error for all the csv files that I have in my folder.

 

Error: Listing of sheet names (2): Record #1: Tool #5: Unable to open archive for unzipping: C:\Users\R643186\Downloads\Auto1_export.csv

 

I have replaced *.* to *.csv in the parent flow input tool. This error comes in the first macro.

 

Thanks.

rohan_tibarewala
9 - Comet

Okay, got it. For CSV files you can use the new macro that i am attaching here.

Since the earlier workflow includes a macro which creates a list of all sheet names found in the excel files, it would not work on CSV file as Alteryx does not support 'List of sheet names' feature for CSV files (as it does not apply to such file type).

 

For CSV files, the solution would be even simpler and smaller as you can see from attached. Hope this works for you.

StephK
5 - Atom

Editing my post:  I had thought this might not work for JSON files.  The error was on my end in the configuration, had nothing to do with the file type.

Ty25
7 - Meteor

Thank you Rohan for posing the question and thank you Nicole for the time saving answer

Labels