Alteryx Designer Desktop Discussions

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

Error Outputting multiple files using Batch Macro

GayatriPanigrahi
8 - Asteroid

Hi All,

I am using attached batch macro to generate multiple output sheets in single excel file.

This was working fine for couple of days but now i am facing issue as "Unable to make final write <File path> Error in use by another process", is there a way to delay each iteration ?

I am using Alteryx version 2019 and can not use other addon like crew macro at present. 

11 REPLIES 11
atcodedog05
22 - Nova
22 - Nova

Hi @GayatriPanigrahi 

 

It's working for me. Are you facing issues with the attached workflow too?

 

atcodedog05_0-1646640089574.png

 

And I can see workflow version is 2021.4

 

Hope this helps : )

 

Qiu
20 - Arcturus
20 - Arcturus

@GayatriPanigrahi 
The input for the batch macro is not complete. 😁

Macro_use_sample-1.PNG

Qiu
20 - Arcturus
20 - Arcturus

@GayatriPanigrahi 
We can also choose not to use any macro.

Macro_use_sample-1A-1.PNGMacro_use_sample-1A-2.png

atcodedog05
22 - Nova
22 - Nova

Hi @Qiu 

 

Dam I didn't notice that 😅 but batch macro will work even if it's just like below

 

atcodedog05_0-1646640588186.png

 

It works because the groupby has been set at this tab. You need to use control parameter only if you cant use this option but sadly not a lot of people know this 😅

atcodedog05_1-1646640635848.png

 

So @GayatriPanigrahi workflow as it is will still work.

 

Hope this helps : )

 

atcodedog05
22 - Nova
22 - Nova

Hi @GayatriPanigrahi 

 

Also another method you can use is just replace sheet name and filename will be fixed as the output tool config.

 

atcodedog05_0-1646641059652.png

 

Output: Same set path

atcodedog05_1-1646640964248.png

 

But the condition is both sheets should have same schema.

 

Hope this helps : )

atcodedog05
22 - Nova
22 - Nova

Hi @GayatriPanigrahi 

 

Also, the simplest mistake that could have happened 😅 is you have the file open on the system. So make sure the file is closed before you output to it.

 

This was working fine for couple of days but now I am facing issue as "Unable to make final write <File path> Error in use by another process", is there a way to delay each iteration?

Each iteration runs after the previous is completed so it should not cause the error.

 

Hope this helps : )

GayatriPanigrahi
8 - Asteroid

Hi @atcodedog05 

There are 20+ sheets need to be generated and as mentioned it was working for couple of days so feel the configuration is done in right direction.

Formula tool is leveraged to create field Sheetname which is passed to macro .

Attaching snap of alteryx result, as you can see write is failed for one sheet however succeed for others.

GayatriPanigrahi_0-1646651236555.png

 

 

GayatriPanigrahi
8 - Asteroid

@Qiu Having action tool is not mandatory. 

atcodedog05
22 - Nova
22 - Nova

Hi @GayatriPanigrahi 

 

As mentioned by me and @Qiu why not try split over using output tool config.

 

If you want to try by giving a delay here is a tool called wait a second you can leverage to give time between.

https://community.alteryx.com/t5/Engine-Works/Crew-Macro-Pack-2016-Q2-Release/ba-p/26482

 

Hope this helps : )

Labels