Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Unable to open file for write

Sreenath_001
7 - Meteor

I have the workflow created and saved in Alteryx server. When that is executed, sometimes it works and sometimes it triggers error as "Unable to open file for write: Can't open file as the process cannot access the file because it is being used by another process". What's the fix for this. Attached screenshots of success and failure messages of the same workflow ran on different time frames.

Sreenath_001_0-1687202578158.pngSreenath_001_1-1687202584112.png

Sreenath_001_2-1687202590832.png

 

40 REPLIES 40
jdminton
12 - Quasar

I was able to run the original without error. Although It isn't necessary to have multiple block until done tools chained together. I had no write errors that you were seeing. Is it possible that server is somehow "opening" the file after the first output and interrupting the process?

albert_alaluf
10 - Fireball
10 - Fireball

Please remember, you're writing to the same Excel files, but different tabs. You cannot write to the same excel but different tabs at the same time. So, your logic 'block until done' was correct, however the problem is, more than one output was trying to write to the same excel, but different tabs at the same time, which was causing the error. You used block until done in three different legs, so basically all runs independently. What you should do, you should tell to Alteryx, to write to the excel, the first tab, finish to write, close the process, then write to the second, finish and close the process, and so on..... This is the reason I used parallel block until done. When I run on my end it worked, but you can also add 'block until done' between two parallel block until done. 

 

Consider another variation. I added block until done. So this works like that.....

It writes to the first sheet, which comes from '1'. Then it waits to finish the process '1', because '2' has a block until done. When '1' was completed, your data goes thru '2', block until done unblock the connection, your data goes thru '3', then to '4', and writes your data to other tab on your excel. Until this completed, your data for the another tab doesn't go thru '5', because the other process is not completed yet, and it is blocked. When 2nd sheet was completed, your data is good to go thru '5'. I used that logic to write more than 50 excel tabs, and it works perfect. 

 

albert_alaluf_0-1687305928370.png

 

Albert Alaluf
Alteryx ACE
https://www.linkedin.com/in/alaluf/
Sreenath_001
7 - Meteor

Thanks for your help. But when I try to load this to server I get the below error. Is the Parallel Block Until Done tool comes along with 2023 version? My server is still 2022 version, is that the reason why I get the below error.

Sreenath_001_0-1687362302199.png

 

albert_alaluf
10 - Fireball
10 - Fireball

Sorry I forgot to mention that. For parallel block, I use CreW macros installed.... You can download it from http://www.chaosreignswithin.com/p/macros.html

for Cleanse, it's default Alteryx tool, you can replace with the ones you have.

Albert Alaluf
Alteryx ACE
https://www.linkedin.com/in/alaluf/
Sreenath_001
7 - Meteor

I have the crew macros installed in my 2022 version designer. Can you please elaborate on the Cleanse tool. I searched but could not find it. All I have is the Data Cleansing Tool highlighted in the screenshot below. Please guide me what I have to do.

Sreenath_001_2-1687362895984.png

 

 

albert_alaluf
10 - Fireball
10 - Fireball

That's correct.... cleanse.yxmc is the data cleansing tool. I used 2022.3.1.486.... It shouldn't return an error. If it's, you can just make a change on your original workflow like I did, by adding parallel block. :-)

Albert Alaluf
Alteryx ACE
https://www.linkedin.com/in/alaluf/
Sreenath_001
7 - Meteor

I tried adding Parallel Block Until Done tool as suggested however, it failed. Please see the screenshot.

Sreenath_001_0-1687365889608.png

 

albert_alaluf
10 - Fireball
10 - Fireball

Please check the location of the excel you write. Be sure either you create or overwrite. If it's already created, you can't create, but overwrite.

Albert Alaluf
Alteryx ACE
https://www.linkedin.com/in/alaluf/
jdminton
12 - Quasar

Try only adding a block until done before each output and one before the select tool below.

jdminton_0-1687368549497.png

 

Sreenath_001
7 - Meteor

Still the same error.

 

Sreenath_001_0-1687371013566.png

 

Labels
Top Solution Authors