Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Batch macro - output is template 26X

michaelcjoyce
7 - Meteor

I am using a batch macro to import 26 Excel files with the same format.  Rather than pulling in data from all 26 Excel files in the Directory, the output is simply the data from the template in the macro, and it is generated 26 times.

 

Any guidance on what I am doing wrong would be appreciated.  Thank you.

7 REPLIES 7
TUSHAR050392
11 - Bolide

Hey @michaelcjoyce Do you have to use the batch macro? If all your files have the same format and you are trying to just read in, you can just use the directory tool and specify the folder path and it will read data automatically from 26 files. Let me know.

michaelcjoyce
7 - Meteor

@TUSHAR050392 I need to pull data from 26 Excel documents, work with the data in Alteryx, then have an Excel output.  I don't see how I can do that without a batch macro or at least a dynamic input?

TUSHAR050392
11 - Bolide

@michaelcjoyce Do you have to work with all 26 files in one go or one by one? If it is one by one then you do need a batch macro but if it is in one go then you can use the directory tool because if all files have same structure then all 26 files can be read together using it. Let me know.

KGT
13 - Pulsar

This sounds like the action tool is not acting properly. Without seeing it, I can't be sure, but it sounds like you're feeding the control parameter with 26 inputs, but the fileInput is not changing to the correct file. Turn on Macro messages in workflow runtime settings and see if there are any messages about what is happening inside the macro on each batch.

 

As for the above recommendation, I expect that would be using wildcards in the Input path.

apathetichell
19 - Altair

@KGTis correct. just post a screen shot of your action tool. It is configured wrong. Usually this is because a) you are updating the wrong part of your input data (you should be updating the value of the filename). b) you are trying to replace a string that is not there. c) you are passing the wrong field into your control parameter.

michaelcjoyce
7 - Meteor

Thank you for the feedback.  Please see below for a screenshot of my Action tool:

 

 

 

Action.PNG

OllieClarke
15 - Aurora
15 - Aurora

Hey @michaelcjoyce 

Your action tool is incorrectly set up. You want to highlight the row above the one currently highlighted 
("File - value=" rather than "@OutputFileName - value=")

The outputfilename is an option to output a new column including the filename or fullpath. You want to update the input file with the control parameter.

 

Hope that helps,

 

Ollie

Labels
Top Solution Authors