Community Halloween is live until October 31st! Complete any 2 quick activities to earn the 2025 Community Halloween badge. Feeling brave? Check out the activities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Creat a Macro Batch to bring multiple sheets from multiple source files

kauser
8 - Asteroid

Hello,

i am working in a workflow and there are multiple inputs files (around 15) and each of these file have single and/or multiple different sheets with different data. How can i create a macro that will help to bring all these file along with sheets name then i can mapped data from these sheets into different places on my workflow(as requirement). i am not combining or piling data from all these different sheets into one. i have found multiple articles and examples but all of these are compiling/piling data from all different sheets into one. For example here i illustrate list of my all input files along with different sheets name 

 

File Name                                                                                                                                          sheet name

ASIA INDIA
 CHINA
EUROPEUK
 NI
AMERICAUSA
 CA
AFRICA EG

 

My expectation is how can i get all these sheets name and then also how can i map data from each one of these sheet into my workflow. 

 

INDIA
CHINA
UK
NI
USA
CA
EG

 

I also tried with Dynamic input tool without Macro then i got error message "check your path" and/or " file is corrupted" 

5 REPLIES 5
alexnajm
18 - Pollux
18 - Pollux

Seems like this was already answered and accepted by @QiuSolved: Re: Macro for Multiple input files with different ... - Alteryx Community

 

Generally the answer is to use Directory --> formula (to add "|||<List of Sheet Names>" to each full path) --> dynamic Input to read in the list of sheet names from each file --> Formula to replace the "|||<List of Sheet Names>" with the sheet column --> Batch Macro to read in all the paths (like the one found here: The Ultimate Input Data Flowchart)

abacon
13 - Pulsar

If I understand you correctly, you want a way to feed multiple files into a macro and get the sheet names of each one so you can map them elsewhere. If that is the case, this workflow with accompanying macros should do the trick.

kauser
8 - Asteroid

@abacon 

can you please upload the workflow again. seems like workflow was not uploaded properly. 

 

thank you 

abacon
13 - Pulsar

@kauser Here you go!

abacon
13 - Pulsar

If this worked for you @kauser, please accept it as a solution!

Labels
Top Solution Authors