Hi
My workflow is saving output in multiple excel files (<200 files) in shared folder. Sometimes few file could be 'readonly' as other users might have opened them, hence my workflow throw an error an stopped at that stage only and don't move forward.
Is it possible that workflow would ignore that 'readonly' file and move forward to save other output files.
Thanks in advance.
Mohit Garg
Solved! Go to Solution.
Hi @mohit9garg
The way for this would be batch macro. Where the batch macro reads each file on each batch run and if there is an issue with a file like read lock it will throw an error but it wont stop execution and it will go to next file name. This way you should be able to get files data even few of them run into error.
Refer this link use the 3rd method batch macro with file paths.
Hope this helps 🙂
@atcodedog05 Thanks. But this is for inputting the data. However I am looking for a similar solution for OUTPUT.
I am overwriting multiple excel files; few of them can be locked (open with some other user). I need to ignore those files and workflow should move forward.
Hi @mohit9garg
Approach would be same you need batch on the output tool.
1. You need to dynamically generate output filename + filepath and configure output tool to write to it by using change path from column
2. You need to batch macro such way that it writes to one per batch.
Batch macro resource : https://community.alteryx.com/t5/Interactive-Lessons/Creating-a-Batch-Macro/ta-p/657923
This way even if one batch fails it goes to the next batch and so on without failing the execution.
Hope this helps 🙂
Thanks @atcodedog05 . I am already using step-1 in my workflow as you stated below.
So I need to create a batch macro for step-2. Let me try to do it; can you please share if you have built anything similar (because I don't know how to create Macro; in fact I have Macro phobia, it sounds very technical 😞).
Hi @mohit9garg
Dont worry batch macro is super simple once you get to know.
Your batch macro will be something like below. Batch macro is basically a workflow where each batch is run for each key, this is been moderated by filter tool filtering each time on single key. And we will be using control parameter to switch keys each batch run.
Main Workflow: You need to use summarize tool to get each unique instance of filename and it needs to configured in questions tab like below.
Here is some resources to learn more about macros.
Video : https://community.alteryx.com/t5/Videos/Build-Your-First-Batch-Macro/td-p/52900
Interactive lesson : https://community.alteryx.com/t5/Interactive-Lessons/Creating-a-Batch-Macro/ta-p/657923
Hope this helps 🙂
Is there anyway to use this solution on the flipside? I have data being pulled from multiple excel files that are stored in a shared folder and if one is open it errors out my workflow.
@atcodedog05 After the recent Alteryx upgrade I started getting below error message-
Error: output macro (91): Record #11: Tool #4: Internal Error - Deadlock detected (@1)
Is there a fix for this error.