Alteryx Designer Desktop Discussions

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

Batch macro to filter countries and output to excel

DanielCarro
8 - Asteroid

Hi guys,

 

Need some guidance on a batch macro, saw some articles over this subject but didn't work.

 

So I have data from one file and there are around 70 countries, where I just want to split the countries into individual excel output which I have a template.

Important: the template has formulas so the data needs to be inserted into a range A4:U2500

 

On my workflow it works well but I don't really want to be doing the filtering for 70 countries but I am struggling with the batch macro

 

DanielCarro_0-1672243196983.png

 

Many thanks,

Dan

 

19 REPLIES 19
DanielCarro
8 - Asteroid

@MatthewO  now it creates the file but doesn't keep the initial format of the template. Maybe instead of overwrite, I need to select something else

 

DanielCarro
8 - Asteroid

@Felipe_Ribeir0  it works fantastic. The only issue is that does work ok on the gallery side (server)

Felipe_Ribeir0
16 - Nebula

@DanielCarro what error are you getting? It should work on server.

DanielCarro
8 - Asteroid

@Felipe_Ribeir0 I haven't checked the gallery yet but will check it tomorrow, and revert back

 

Felipe_Ribeir0
16 - Nebula

@DanielCarro just be sure that the server machine has access to the network folders that this workflow will use and that you pass the filepaths as UNC and it should work without problems.

Felipe_Ribeir0
16 - Nebula

Hi @DanielCarro 

 

It worked?

DanielCarro
8 - Asteroid

@Felipe_Ribeir0  it worked fine on the server. So all good. Many thanks Felipe

Felipe_Ribeir0
16 - Nebula

@DanielCarro  i am glad it worked.

 

Please accept my answer as a solution so the topic can be considered closed and someone with the same problem can find this answer too.

Felipe_Ribeir0_0-1672403095561.png

Thanks!

 

aba
7 - Meteor

Hi @Felipe_Ribeir0 ,

 

I have a similar issue and I think the macro MC_COPYFILES would be the solution but can't seem to get the macro working. Basically, I'm trying to output to a .xlsm file but I keep getting an error on the macro (Tool #10 specifically). 

 

What configuration is required to update and use the macro?

 

Thanks,

 

Aba

Felipe_Ribeir0
16 - Nebula

Hi @aba 

 

The Tool #10 is the  python tool of the macro. See if the final message of the error is something like 'No such file or directory:...'

 
 

Screenshot 2023-07-24 104816.png

 

If this is the case, go back to your main workflow and be sure that you are providing valid filepaths to sourceFile/destinationFile fields of the macro.

 

Screenshot 2023-07-24 105055.png

 

Labels