I'm still a bit of a noob with macros but I ran across a datasource (excel - what else causes more problems?) which had the classic spanning headers thusly...
So I came up with this little macro to create a concatenated header. The only input is the number of header rows.
In order for this to work, the input needs to have "First Row Contains Data" Checked to get the generic column names. Is there a way to set this in the macro?
After which you can join this back to the data and use the dynamic rename
It's not perfect - this is excel where anything not only can happen but will happen. You can easily have a duplicate column name so Alteryx will make this unique.
Like I said - one of my first macros but learning more each day. Thanks for viewing
Solved! Go to Solution.
I'm not sure I know what you mean by "set this in the macro".
If you mean that you want to use a 'Data Input' tool instead of the 'Macro Input' tool as the start of the workflow, then there is a way. You could connect the 'Data Input' tool with a 'Check Box' and an 'Action'. If you want to stay with the 'Macro Input' then the data arrives to the macro already with this selection chosen or not chosen.