ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Batch Macro: Only working on template sheet and not multiple files

amnahhussain02
7 - Meteor

I thought the solution from this post would help me. However, whenever I use it, it is using the template sheet I put in the macro and only pulling out the values from here. It's not reading each individual folder in the directory and scraping the data from these. I'm not sure where the issue is. The first macro is supposed to be pulling out the sheet names of each excel sheet in the directory BUT it's only picking up the template sheet's names. The second is supposed to be importing the sheet data into a single file but again it's only doing it for the template sheet. This template sheet is what I need the data output to look like. Do I change this?

 

Any ideas?

amnahhussain02_1-1764156988616.png

 

amnahhussain02_0-1764156868907.png

 

14 REPLIES 14
amnahhussain02
7 - Meteor

Should I use 'replace a specific string'? If so, what would I put in this box? I would like the file path to change depending on the file name. In the original, they just used this.

amnahhussain02_0-1764167171549.png

 

amnahhussain02
7 - Meteor

The screenshot is my batch macro. When I click on action, It has values or attribute to update. I have my action type as update value (default). Would this be correct?

alexnajm
19 - Altair
19 - Altair

You would put in the string you want to replace in that box that will get replaced by what comes through the batch macro - I can't tell if you've done it correctly since it's blacked out, but it would be whatever is in the Input Data tool in the macro that would get replaced by what comes through your main workflow into the macro

amnahhussain02
7 - Meteor

I've restarted this. Some of the files don't have the sheet name so alteryx is erroring this. I'm trying to surpass this via a dynamic input but any tips?

alexnajm
19 - Altair
19 - Altair

I think a macro is the way to go - it just needs the full path, with a sheet if it is an .xlsx file or without if it is a .csv

Labels
Top Solution Authors