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

Alteryx Designer Desktop Discussions

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

Combine all excel sheets & field name with the sheet name using macro

Chirag_KRCPL
8 - Asteroid

I have data in 2 excel tabs as follows:

 

Chirag_KRCPL_0-1657859006624.png

Chirag_KRCPL_1-1657859054129.png

I want to use macro that gives me following output:

Chirag_KRCPL_3-1657859492014.png

 

So basically I want to do the following via macro
1) Combine all the excel tabs 
2) Combine field name with the sheet name &

3) Add an additional column that contains sheet name   

 

 

4 REPLIES 4
SPetrie
13 - Pulsar

The type of macro you want is a batch macro. I recently created a macro that mostly does all this already so it was a pretty quick change for your ask. Feed it the full address of the file with its sheet name and also the actual sheet name by itself to be used with naming and labeling.

SPetrie_1-1657860748710.png

SPetrie_2-1657860908056.png

 

 

 

 

 

Chirag_KRCPL
8 - Asteroid

With which tool do we need to link the "TabName" control parameter tool?

SPetrie
13 - Pulsar

That control parameter doesnt need to be attached to anything. Its being used as a reference shortcut.

 I changed the name of that parameter to something easy for me to identify and then I can reference it in a formula tool using the reference shortcut.

SPetrie_0-1657886116550.png

 

SPetrie_1-1657886116668.png

Once its setup, you can make a reference to it in the formula or other tools.

This is where I use it to populate the SheetNames column

SPetrie_5-1657886341124.png

and this is where it is used to rename the columns.

 

SPetrie_6-1657886398623.png

 

 

 

 

 

Chirag_KRCPL
8 - Asteroid

@SPetrie Thankyou for your response!!

Labels