Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?


Reading in multiple csv files with different Field Schema - Batch Macro.



I have a list of csv files with different schemas. From these files I only want to import the common headers listed below. The file names also keep changing. The only common word in the filenames are "decom". Is there a macro I can use to import the required fields from these files?





@racoon in terms of bringing multiple csv files, you can use the Input Data tool (under the In/Out tools category), point to one of the files that you want to bring in, then use the * wildcard to replace the variable portion of the file name and keep the common portion.  For example, this could look like this:  *dcom*.csv


Once you bring in the .csv files, you can use the Select tool (under the Preparation tools category) to keep only the 14 columns that you want to bring in. 


I hope this helps.  Please let me know how it goes. 

Alteryx Partner

I'm not aware of a tool that will read in only specific headers of files with different schemas, but you could probably read all the files in then use Dynamic Select to drop all that aren't in that list.


@CameronS has written a macro that will allow you to read in a number of files with different schemas, and you may be able to adapt it to your purposes. You can find his explanation here:


The macro itself is located here:!app/Read_All_Excel_Files/58dd51b3a18e9e18fca64172


Let me know if this seems like it might work, or if you need help with the Dynamic Select configuration



Alteryx Certified Partner
Alteryx Certified Partner

I tend to recommend using this macro 'batch.yxzp' found in this post:


It reads in files of any type and any schema, given a full file path.


So you can use the directory tool to read those paths, and then simply plug it into this macro.




Thanks! This works perfectly.