Hi all,
I'm looking for a way to create a simple workflow that can have any excel input and rename all the columns of that input to something generic (Text1, Text2, Text3 or A, B, C or F1, F2, F3 etc). The number of columns of each excel is unknown.
I need this because after this renaming of the columns, I will have a formula that looks for a value in a specific column position (based on position, not name). So if the name of that column doesn't exist in another excel of a different format, the workflow would break. But if I can somehow always rename any and all columns of each excel from the beginning of the workflow, it would work.
Can someone attach an example?
Solved! Go to Solution.
Hi @AkisM ,
Assuming that your input looks something like this:
You can rename all columns to F1, F2 and so on by ticking the "First row contains data" box under options on the left hand-side of your screen
The final step is to start data input from row 2, and that will remove your headers that will now appear as data in the first row
Another way to work with your data in case you don't know the number of columns or in case column headers may change slightly is to find a key column (something like a record ID or similar that will always exist across all files) and then transpose all other columns to rows. In that way, you won't have to reference the name of the columns anywhere in your macro.
Hope that helps,
Angelos
Thanks @AngelosPachis , you're right, I completely forgot that by simply checking the "first row contains data" option, alteryx will always give the default placeholder column names to any excel input. That is good enough for what I'm trying to achieve. Thanks.