Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Combine multiple excel files with same fields (different file names and different tabs)

Highlighted
Atom

Is there a simple way to bring in all of the xls files in a directory and run the equivalent of a 'union' on them?

Been reading about directory input and dynamic input; can't seem to get those solutions to work. 

Thanks

Highlighted
Quasar
Quasar

If your files are .xlsx you can use the Wildcard XLSX Input tool from the CReW Macros set at http://www.chaosreignswithin.com/p/macros.html

 

If they are .xls files, you could use the attached as a simple way to load all all sheets from all files, appending the data.

 

You will need to ensure that the three files attached are in the same directory to work, as it uses the .vbs to get the sheet names, and then the macro to load each sheet.

Highlighted
ACE Emeritus
ACE Emeritus

A method to accomplish this is to use a directory and a dynamic input tool.  I've created a better directory macro that splits out all excel sheets as separate lines in the directory.  I've also made a dynamic input batch macro that specifically works with excel files (D output for the data, F output for the directory files that failed, S output for the directory files that succeeded)  You can find them attached below.

Highlighted
Alteryx
Alteryx
Highlighted

Your DynamicExcel work stream solved my problem. Thank you for sharing!

Labels