Double loop to iterate all the categories in a file's columns


Here’s my problem. I want to create an excel file in which there’s a sheet per every column in the source table, in each sheet i’ll write the result of a group by node that iterate for every distinct value in my attributes. Let’s explain it better. Let’s say I have a table that looks like this:

Knime ex

I want to have per output an excel that looks like this:

For creating a different sheet for every category, I know it’s a simple loop like this:

Knime ex4

Now I’m stuck. How can I parametrize the different columns so I don’t have to do a metanode for every column, repeating this flow? I don’t really know what nodes to call, I think I have to do a loop that involve creating a list that contains all the column name in the table, but I don’t know if it’s the right call and what to do next. Can you please help?

You can extract column headers, (if necessary transpose them) and then use them as flow variable input


Do you have (perhaps) an example of a workflow in which you do something similar?

Welcome to the forum @dario59.

Here’s a workflow which does what you want:


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