Hi Alteryx Community,
Newbie here in Alteryx. I've looked through various posts but unable to find a solution to this error.
The output tool shows an error while running the workflow stating "the file is being used by another process (32)". The output is being written to separate sheets or updating the previous worksheets in the the same excel file at different stages of the workflow. For example, if the first output tool is used at tool 5, the second output might be at step 7 or 10 and the third output (updating first output) at step 12 etc.
However, please note the below points:
1. All instances of excel closed while running the workflow
2. The workflow and output are both stored locally
3. The error doesn't come when the prior output is placed a bit further from the succeeding output.
Not sure what's causing the issue. Also, just for context, this is not a case of batch output or Block until done tool. Those would not be required/work in this case.
Appreciate any help on this, thanks!
Johnson
Solved! Go to Solution.
Hi @JohnsonRaju ,
You might want to read up in THIS feed.
This looks like the same problem.
The problem you're having is you are attempting to write to a file multiple times simultaneously. The last thing I posted there should help you.
M.
Hi @mceleavey
Thanks for the response!
But I'm afraid that solution doesn't apply here. I am not generating multiple outputs at the same point on the workflow.
Each output is in chronological order. Output 3 comes only after output 2 is generated, although Output 3 is updating Output 1.
In such a case, the Block until done tool is not applicable for my use-case.
without seeing your workflow it's going to be very difficult to understand what you're doing.
M.
Hi @mceleavey
I cant upload the workflow in itself, but the configuration looks like this. As you can probably see 2 output tools in the attached image.
Both outputs are configured to write/update data in different worksheets of the same excel file. However, there is an error in the second output in this case.
As mentioned in original query, the error doesn't appear when I move the first output in the image, from the workflow, a bit further back in the workflow.
Thanks!
@mceleavey for some added context further to last image,
This image is part of the workflow that precedes the last one. So if you look here, there aren't any errors for the output tool although the configuration is similar in this case.
Output 1 is creating a new sheet whereas output 2 is updating an earlier created sheet, from the same workflow. Both outputs in the same excel file.
Hope this helps you comprehend better. Appreciate you looking into it!
Johnson
Hi @JohnsonRaju ,
This is because you are trying to write the same file simultaneously with two outputs.
You need to make it sequential, to do this I've mocked up your workflow, and I've used two Block until done tools to ensure the first process completes before the second:
This looks strange, and the join before the second output is set to NOT join, so pick any two fields that will never join and make sure you are taking the left.
This simply makes it sequential and the first output will always run first.
Hope this helps,
M.
Hi @mceleavey ,
Thank you so much! This not only solved the problem, but it helped me understand the concept a lot better.
Though I insisted the Block until done wouldn't be applicable, it indeed does. Thanks for the patience and help!
It happens randomly for me as well. When I am writing into 50 files with multiple tabs in each file, 3 or 4 of them fail with the same error, but the remaining are written successfully. And I cannot use the AMP engine solution. But I have used the block until done and batch macro to write. Ive attached the batch macro, Any suggestions?
error message:
Error: ResidualMacro2 (410): Record #10: WriteToTabMacro (96): Record #3: Tool #14: Unable to create backup of \Output\AAAAAAAA_ALTERYX.xlsx to \\Output\AAAAAAAA_ALTERYX.xlsx.bak: The process cannot access the file because it is being used by another process. (32)
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |