Alteryx Designer Discussions

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

Input Multiple Files with Different Sheets and Different Schemas

PeterAP
8 - Asteroid

I'm trying to import multiple files which have different sheets and slightly different schemas (i.e. the headers in different orders) using batch macros.

 

I've used a directory tool to first bring in the list of files and then a batch macro to pull in the list of sheet names and add the sheet name to the file path. This seems to work fine and gives me an output similar to below:

 

File Path

\folder\workbook1.xlsx|||sheet123

\folder\workbook2.xlsx|||sheet456

 

I'm then using another batch macro to push this list into an input tool using update value in the action tool to update the file patch including sheet name - however it's still only pulling the data in the first file. It's as if it's not recognising a change in sheet name or something? I've also checked the auto config by name in the interface designer in the macro.

 

Please help!

 

PeterAP_0-1624033769726.png

PeterAP_1-1624033863767.png

PeterAP_2-1624033926868.png

 

4 REPLIES 4
RodR
Alteryx
Alteryx

Hi Peter. I have found a lot of success with inputting multiple sheets from multiple excel files by using the Excel File Opener macro: https://community.alteryx.com/t5/Engine-Works/The-Ultimate-Alteryx-Holiday-gift-of-2015-Read-All-Exc....  Give this a shot and see if it produces what you are looking for!

KilianL
Alteryx
Alteryx

Hi @PeterAP ,

 

this sounds like the classic batch macro bug: simply add a tool after your macro and all records appear magically.

 

Please mark this as the solution if it answers your question, it will help others to find solutions quicker.


Kind Regards,
Kilian
Solutions Engineer - Alteryx

PeterAP
8 - Asteroid

Thanks @RodR I will give this a try when I have problems in the future!

PeterAP
8 - Asteroid

Thanks @KilianL  this was exactly the issue I was having! Thank you! It now works perfectly!

 

This is why the Alteryx Community is so good, I was spending a lot of time trying to figure out why it wouldn't work!

Labels