Alteryx Designer Desktop Discussions

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

Help fixing lost batch Macros

Dave
8 - Asteroid

Hi all

 

I had a batch macros set up which basically ready the file names in a directory of excel sheets and combined all the files that had a certain text string under a set of headers common to the files

 

Dave_0-1639567181286.png

It was working great but I seem to have deleted the macros

 

I am not an expert in Macros writing and would love to retrieve it (name batch correct.yxmd) or replace it with something suitable. Ive tried searching for it but for the life of me I cant find it

 

This is the error I am getting

 

Dave_1-1639567345778.png

 

Would appreciate any assistance

 

Dave

 

3 REPLIES 3
Sebastiaandb
12 - Quasar

Hi @Dave ,

 

I feel sorry for your loss (sorry, couldn't help myself making a stupid joke). 

 

What you can do to fix this:

 

1- Find the macro (but as you stated, it's obviously gone to the recycle bin);

2- Make a new macro and place it in the C:\Users\davidsmyth\Downloads\Batch Input\_externals\1\  and name it "Batch Correct.yxmc". After you made it, the workflow can find the macro and the question mark will disappear.

3- Try to alter the macro i attached to your needs :-). If you can supply me with some dummy Excels and the specifics of the sheetname it has to have (or other variables), i can alter it for you.

 

Greetings,

 

Seb

 

Dave
8 - Asteroid

hahaha thank you @Sebastiaandb it is indeed a great loss

 

Im not particularly good at creating macros so I would appreciate the help

 

Basically it looked in the directory above and combined all the files with *20014* in the name into one file. All the files have a single sheet (Sheet1) and are essentially just a table of data with the same field headings. 

 

They are essentially the same file one for each month, I just want to combine them all into a single spreadheet for metrics purposes. 

 

The reason 20014 is specified is because it is a country signifier, and there will be other files of the same construction in the same folder with other signifiers (20001, 20002) that will will build similar but separate combiners for

 

I hope this makes sense

Sebastiaandb
12 - Quasar

Hi @Dave 

 

Here you go:

 

Sebastiaandb_0-1639747787140.png

 

Just change the directory to your liking 🙂 (in the directory tool in the workflow).

 

It stacks the output on top of each other (like a union)

 

Sebastiaandb_1-1639747831536.png

 

Hope it helps!

Greetings,

 

Seb

 

Labels