Alteryx Designer Desktop Discussions

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

Rename column headers on all tabs on an excel workbook based on reference table

hjiang1217
6 - Meteoroid

Hi there, I know Dynamic Rename tool can rename fields of an excel tab based on reference table (having reference table as Right input and configure Dynamic Rename tool to "Take Field Names from Right Input rows" & select old/new field names). Yet, I have dozens of tabs that need to be renamed per same reference table, how do I do that for all the tabs altogether?

 

Thanks!

3 REPLIES 3
Aguisande
15 - Aurora
15 - Aurora

Hi @hjiang1217 

I have something that might do the trick for you.

Aguisande_1-1638910531317.png

Macro:

Aguisande_2-1638910735972.png

 

 

Some notes:

- Output FileName as Field should be in Full Path 

- Read <List of Sheet Names> Must be the option in the Input Data Tool

Aguisande_0-1638910472762.png

In the Macro Questions:

Aguisande_3-1638910775776.png

Select the New File to Save (It'll have the same data as previous, but the Sheets renamed)

 

The Dictionary is inside the macro (In this case a Text Input), but you can replace it whith whatever you're using now.

 

Let me know if this helps

 

Best

tani1901
5 - Atom

Hi @aguisande,

 

I find your solution very useful for my question at the momemt.

I would like to ask further how I can run the macro for this situation, where I want to change the column name in multiple sheets of the store report file? 

Sorry I'm not so familiar much with macro yet :(

Thank you!

 

Aguisande
15 - Aurora
15 - Aurora

Hi @tani1901 

Maybe it'll be better if you tell me more details about what you need to accomplish.

I built the above workflows 2 years ago, and I don't remember what they do (and for what the post says, it won't work for a different use case that the one they were built for)

 

Note: Also, I don't think this is a case for an iterative macro either.

Labels