Consolidate with the same header names

Want to consolidate different excel file tab but with the same header name. How to do it?

I am already in the excel reader output and noticed that the copied data from the excel files with the same header names are copying also the header names of the other excel file. I wanted the output to be with only one header name since the excel files that I am copying is already the same header names.

Welcome to the KNIME community!

I am assuming that are you trying to read all of the files in in one go using the same Excel Reader, and in the xlsx files, the table structure is the same, with the same number of columns (and ordering of the columns is the same) in each, but that there are some variations in the spellings of the headings? (If the headings were all the same, it shouldn’t be a problem)

If that is the case, you can do the following:

In the uppermost Excel Reader, you set the config as follows so that no header is set:

In the lower Excel Reader, you set the config to read only one file, which contains the required headers, and tell it to read the headings in row 1, but only read the file from row 1 to 1:

Configure Insert Column Headers as follows:

This should then give you the data from all excel files, using the heading from just one of them.

If this isn’t what you meant, then can you please explain further, and show some examples of what is happening.

1 Like

i have follow your advice however it is still collecting the headers

this is my setting in the upper excel reader

it is working now. thank you


@TLKNW you did make sure to actually use the Flow Variables and paths so that they would change dynamically?

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