Alteryx Designer Desktop Discussions

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

Input Multiple Excel Files using * and fixing different file schemas with batch macro

oracleoftemple
9 - Comet

I'm importing multiple excel files from the same folder using a wildcard (*), and when I import all files it ignores some saying that they have a different schema than the first one.  All the rows are named the same, but it looks like Alteryx is assigning different data types to some of those fields.  I have read the post called "Importing multiple excel files" so I know what the solution is.  I should create a batch macro that uses the Select tool to make sure all columns have a consistent type from file to file.

 

My problem is that I don't know HOW to make a batch macro.  Can someone walk me through this?

6 REPLIES 6
DavidP
17 - Castor
17 - Castor

This is a great article that explains how to do it

 

https://community.alteryx.com/t5/Alteryx-Knowledge-Base/CS-Macro-Dev-Reading-in-multiple-files-with-...

 

And attached is a macro already written and a workflow to run it. The workflows expects the macro to be in

 

C:\ProgramData\Alteryx\Macros

 

If you put it somewhere else, you'll just have to delete the macro from the workflow and add it back in from your macros tool palette

 

 

 

 

oracleoftemple
9 - Comet

This is a huge help!  This was driving me crazy.  Thanks!

Ekta
8 - Asteroid

Hi , This workflow is amazingly working -- possible if could help me with one addition to it-- if any of the excel file has multiple tabs , can we update the workflow please 

 

4 files are 1 tab only and 1 or 2 xlsx are multi tabs.

 

Thank you in advance

oracleoftemple
9 - Comet

I'm afraid the best I can do is a separate macro that opens multiple excel docs with multiple tabs.  I'm not quite sure how to incorporate it into our "multiple files with different schemas" workflow.

Ekta
8 - Asteroid

Hi , Thanks a lot for the workflow,, 

unfortunately , i am not able to open the macros -- macro tools are with ? tools.

 

Please help

Mashao
5 - Atom

Thanks for your solution, however it seem to be looping over just one file. Do you have any idea why?

Labels