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?
Hi, are you sure it is a Batch macro. Usually they have two inputs, is why i am asking.
While you have the macro open, go to workflow and check that the macro type is set to batch macro.
Hope this helps :)
In this macro, the data is passing, but the output records are not showing right.
ok can you open the macro and check each tool what is happening in each tool, and check our requirements are passing the tool exactly correct or not? Is there any errors, or is your exact requirement is containing the input file or not there or like that one
Hi yes it is. I also thought that may be the reason
Hi, the output is showing however it's only showing the values of the template sheet in the macro as shown above and not for any of the other files. I wanted to use this macro to find all files in the directory that have '725' in their file name hence why I have a filter after to find these files.
As you can see, the output is just the same sheet's file path. Not sure why but the values are being repeated too.
Hello! It sounds like you're trying to read multiple files in a directory that contain '725' in their filename, but your Alteryx workflow is currently only processing a single "template" file or a fixed set of files.
Here is a step-by-step explanation of how to set up an Alteryx workflow, using a Directory tool and a Dynamic Input tool, to achieve this. This is the standard and most robust way to process multiple files based on a filter in their names.
🛠️ Alteryx Workflow for Dynamic File Input
1. Use the Directory Tool to Get File Paths
The Directory tool reads a specified folder and outputs a row for every file it finds, including its full path, name, and other metadata.
Action: Drag a Directory tool (from the Input Data category) onto the canvas.
Configuration:
Click on Directory in the configuration pane.
Browse to the folder that contains all the files you want to read.
(Optional but Recommended) If your files are all the same type (e.g., all .xlsx or all .csv), you can specify a File Specification like *.xlsx to pre-filter the file list, although the next step will handle a more specific filter.
Hello! It sounds like you're trying to read multiple files in a directory that contain '725' in their filename, but your Alteryx workflow is currently only processing a single "template" file or a fixed set of files.
Here is a step-by-step explanation of how to set up an Alteryx workflow, using a Directory tool and a Dynamic Input tool, to achieve this. This is the standard and most robust way to process multiple files based on a filter in their names.
🛠️ Alteryx Workflow for Dynamic File Input
1. Use the Directory Tool to Get File Paths
The Directory tool reads a specified folder and outputs a row for every file it finds, including its full path, name, and other metadata.
Action: Drag a Directory tool (from the Input Data category) onto the canvas.
Configuration:
Click on Directory in the configuration pane.
Browse to the folder that contains all the files you want to read.
(Optional but Recommended) If your files are all the same type (e.g., all .xlsx or all .csv), you can specify a File Specification like *.xlsx to pre-filter the file list, although the next step will handle a more specific filter.
| Output Fields | Description |
| FullPath | The full path to the file (e.g., C:\MyData\File_725_A.xlsx). This is the key field we will use. |
| FileName | Just the name of the file (e.g., File_725_A.xlsx). |
2. Use the Filter Tool to Select Files Containing '725'
Now that you have a list of all files, you can filter this list to only include those with '725' in their name.
Action: Connect a Filter tool (from the Preparation category) to the output of the Directory tool.
Configuration:
Set the Basic Filter expression to check the FileName field.
Expression:
Contains([FileName], "725")
The True (T) anchor will now contain the list of only the files you want to process.
you need to check your Action tools to make sure the correct value is being updated - you can use the Debug Workflow feature in Interface Designer to pass in a test file path and see if it is updating the tools correctly
I've done this in the Main workflow. Do I have to use it in the batch macro too?
I don't understand the question - there won't be Action tools in your main workflow, only in your macro

