Hi @saiakula15 , unfortunately we cannot execute your workflow, or see what it is doing because the Excel files that are the source are local to your environment and not included in the workflow. If you execute the workflow and then upload it again but make sure you have unticked “reset workflow” when exporting, we will be able to run it with the data.
As @ipazin said, the Reference Column Filter node should be able to filter the columns without a loop. I’m not sure why using the Reference Column Filter node should mean other users will make changes to the workflow, but maybe I’m misunderstanding.
What problem did the Reference Column Filter give you when you tried it? That may be an easier problem to solve than the one you are posting
There are two ways you could use the Reference Column Filter.
It is designed to receive a table that contains the “reference columns” that are to be kept, and filter the other table on that basis. So if you had two columns you wished to retain “EE ID” and “EE Name”, you could set it up as follows:
The Table Creator would look like this:
Now I can see that if your list of columns to keep were to be dynamic, then maybe this wouldn’t be ideal as the Table Creator would need columns added/removed. So, this could be adapted to a similar way to how you have it.
If the Table Creator were configured as follows:
You could still use it with the Reference Column Filter mode, but you would just need to transform it:
If using KNIME 5.1, a Table Transposer followed by a “Row to Column Names” would adapt the table to the input required by the Reference Column Filter
If using KNIME 4.x, a “Transpose” node followed by a “Row to Column Header” would do the same job
Re your second question, without being able to run your workflow, we cannot tell what the error your Column Rename (regex) is throwing, nor what column names are causing the problems. If you can give an example of the column name and the regex being used, along with the warning message, or as mentioned above post a runnable version of the workflow, somebody can probably assist.