Add a string to the end of a column header

Hi

Please can someone tell me how to add a string to all column headers in KNIME. For example, I want to add the word December at the end of all the column headings (example if a column name if “Frequency”, it should be “Frequency December” ). The sheet has over 100 columns, so Column Rename node is out of the picture. I think I need something dynamic that’ll apply to all the columns at once. I’ll also appreciate it if you don’t just tell me to use the string manipulation node, but how to use it.

Thanks in advance

Hi @chefor99 , does this work for you?

Input is:

Output is:

The logic I used is:

  • Extract headers from data
  • Append " December" to the extracted headers via the String Manipulation (Multi Column) node
  • Insert the modified headers as headers

This is how the workflow looks like:
image

And here is the workflow: Add a string to the end of a column header.knwf (11.8 KB)

5 Likes

thank you very much. This solves it

1 Like

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

Hello there,

just to drop info that this can be easily done with Column Rename (Regex) node.

Br,
Ivan

3 Likes