Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Input multiple excel files, perform same transformations, write to separate output files

akshatrajj
7 - Meteor

I have multiple excel files in a folder, each having different structure (number and names of columns). I want to read these files one-by-one, perform same specific transformations on each of them (like transpose- all the columns, sort, etc.) and then output the results in separate txt/excel files, one-by-one. 

How can I automate this entire process?

7 REPLIES 7
BrandonB
Alteryx
Alteryx

Have you built a macro before? You can add a control parameter and an action tool to your input and then feed in a list of file paths with a directory tool. You will also want to use use the option in the output data tool to take file/table name from field so that you can dynamically generate output files. Here is a training video on building your first macro:

https://community.alteryx.com/t5/Videos/Build-Your-First-Batch-Macro/td-p/52900

Qiu
20 - Arcturus
20 - Arcturus

@akshatrajj 
Just to add to @BrandonB , there are several macros/sample I picked up from here for you to real multi Excel files for different situations.

akshatrajj
7 - Meteor

I have built a macro before through resources available on community. Please refer the screenshot below:

 

1.JPG

 

Using this macro, I'm able to dynamically read various input files. But before I can apply the transformations, I find that the data from the different files is combined into one dataset (Please refer the results of the output tool). In this manner, the transformations are all applied to the combined data instead of each dataset separately. 

akshatrajj_0-1603346282252.png

 

 

 

Qiu
20 - Arcturus
20 - Arcturus

@akshatrajj 
How about put an Output tool inside your Macro?

akshatrajj
7 - Meteor

In that case, I would be unable to apply the transformations that I require to be applied to the data before it is dumped in the output files.

Qiu
20 - Arcturus
20 - Arcturus

@akshatrajj 
I mean all the necessary action to be included into macro and output of Macro is only dummy.

Qiu
20 - Arcturus
20 - Arcturus

@akshatrajj 
Modified the workflow by @BrandonB  so maybe you can get the picture here.

Labels