I'm trying to use my first batch macro, because I have a workflow pulling files from a folder and there are too many for individual inputs. Additionally, I continue to get the "Different schema" error for 4-5 files, no matter how many times I've tried to save the formatting over.
I am using the batch macro from this page - https://knowledge.alteryx.com/index/s/article/The-Ultimate-Input-Data-Flowchart-1583459854309
After opening the Alteryx package, I have updated the path for the Directory Tool Input to my folder.
I have also opened the macro and updated the path for the input tool placeholder. This seems to have updated the File Value on the Update Value tool.
However, when I run it, it gives me an error - Error: Batch Correct (2): Record #1: Tool #1: Unable to open file for read: Sheets\.849C9593-D756-4E56-8D6E-42412F2A707B
It seems like it's aimed at the correct folder but it's trying to read something else - maybe the example data that came with the macro?
I've attached screenshots if it helps (I deleted parts of file path names as needed)
Solved! Go to Solution.
Make sure the list of files from the Directory tool are only Excel files
Otherwise yes you can try changing the Input Data tool in the macro to a file that exists on your machine
Everything in the folder is an .xlsx file. It's a shared network folder.
The Workflow is on my computer. I downloaded the file from that Alteryx Learning site I posted, it's in my downloads folder. Not sure how important that is but wanted to cover everything.
Changing the input on the Input Data Tool was giving me the error I posted, after I read your reply, I deleted the Input Data Tool and put in a new one and referenced the same folder and got the same error.
It’s hard to tell then what’s going on without more information - I have downloaded the same attachment numerous times and it has been successful.
You can rebuild it from scratch then since it’s only four tools and use that new macro in your workflow. Otherwise you’ll have to provide more to help - screenshots of each of your configs and data, the workflow with the macro, etc.
Main thing to consider - is the Action tool making the update it needs to be doing?
I seem to have figured it out.
When changing the file path for the Directory Input Tool, I was not updating the File Specification. For some reason, when it remained *.*, I got the error above referencing an unreadable file "\.849C9593-D756-4E56-8D6E-42412F2A707B"
I updated the File Specification to *.xlsx, and it seems to be working fine now. Not totally sure why it didn't like *.*, but I'm going to leave this up with a screenshot for future users. Thanks for your help on this.
Fantastic. That is related to my first reply :) if you could also mark my response is a solution, it would be greatly appreciated. Thanks in advance!
Ah, I see that now - I misread it originally while I was trying to understand the batch macro. Thank you again.
No problem!