Reading list of multiple files and combine them into one data

Hi team,

In a folder, I have 6 files. but 2 of them are bad file with wrong format and only 4 files with correct format.
Through some existing workflow, I am able to filter out bad files and leave only the 4 good files in a list of files (in List Files/Folder node) that I want to append together into a sheet of combined data. (the files have the same for format and same header).
In List Files/Folder node, it shows the path to each file (2nd picture).
When I convert the path to variable to link to excel reader to link the address, it only read one file by one file and each one will be replaced by the previous file address.
Instead of writing each one out to excel files and reread again to append, is there a way I can read the 4 files address from List Files/Folder node by combined them together into one data ?

image


Hi,
Try to use a simple loop end node connected to the out port of the Excel reader : it will collect all the data.
Rem : the loop begin with ‘something’ with ‘variable’ but that doesn’t mean that you have to end with a node with ‘variable’ !

Edit : see this for example 5 - Table Row to Variable Loops – KNIME Community Hub (similar operation with table reader)
Best,
Joel

4 Likes

Hi @JPollet ,

Thank you so much. it works.
I need to collect the consolidated data from Loop end node instead of Excel writer node.

THank you thank you thank you ^^

1 Like

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