Reading multiple files, returning multiple rows - how to fix?

Hi

I am new to Knime and I am trying to convert the format of a sheet that looks like this:

Into a workbook with two different sheets, with those in gray as the column headers.

This is how my workflow looks like:

But once it reads multiple files - it also returns multiple rows like this:
image

How do I make it extract the headers only once? Any tips?

Any help would be appreciated, thank you!

Hi @sophieee,

I got good news for you, with the new excel reader this is super easy, you can tell it to read all files in a folder and apply the same filtering to all of them:

That should help you further :slight_smile:

best,
Gabriel

Hi @gab1one -

I am currently running on Knime 4.1.1 since it is the version required by our organization. This is how my excel reader node looks like. Any tips on how to still make it work? :smiley:

Hi @sophieee

In that case you can use a loop to read all files in the folder, take a look at this example workflow

That should work with your data

best,
Gabriel

3 Likes

couldn’t you just use a row filter?

Hi @sophieee,
why do you don’t set the Option “Table contains column names in row number…”? With this setting you avoid replication of header rows.

BR

Hi @morpheus -

I have tried your suggestion but I am getting this error

Thanks!

Hi @sophieee
this error occurs while in section Row IDs 'Table contains row IDs in column " is enabled. If you dont have unique ID information “Generate row IDs” must be enabled. Otherwise the import fails at the first frequently content in your data.

If your data are an offset (not starting in Row 1) you should also consider it in the section “select the column and rows to read”.

The preview shows you if you have the correct settings. If you have further trouble i recommend to share your worfklow or a sample file with us.

BR
BR

2 Likes

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