Rename Column to Index


I’m trying to rename a set of columns (all of which are numeric) according to their index minus one, with one decimal place. For instance, if I have columns A, B, C and D, I’d like for them to be renamed to 0.0, 1.0, 2.0 and 3.0. Bear in mind that the number of columns and their names might change (so I might have columns A, B, C and D now, and columns E and F, and columns R to Z next).

I have managed to do it by transposing my table, creating a new column with Math Formula in which values are the RowIndex, then changing the RowIDs (which are the original column names) to the RowIndex, and then transposing it back to the original form. Although it works, it’s complicated and time-costly (transposing a lot of data).

Can you think of a workaround for this?

Thanks a mill,

Hi @g_oliv,

Are you looking for something like this:

column_rename.knwf (23.5 KB)




you can use the

to do this. It will automatically rename all columns to their numbers starting from 0 with the setting as in the following screenshot.

I uploaded you a workflow, which also show how you can manipulate this even further.

I would not recommend using a Loop. The loop end will join all the parts of the inside of the loop based on the RowId. This will take quite some resources.

Cheers, Iris


So simple, I just feel silly now hahaha! Thank you!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.