I have two excel files and need to combine in to a single file. Upon using file list/folder node, group loop start, table row variable, csv reader.
In group loop start I am not able to see one of the file incorporated. I want both my files to be combined to make a single file.
If there’s any other alternate solution to combine files are also welcome.
First of all: Welcome to the world of KNIME.
The task which you would like to perform is quite easy and works without loop (at least for two input files). The only prerequisite is that both tables have the same headings.
I would just use twice the file reader to tread the two files in a table.
After that I would add the concatenate node.
The last step is writing the data in whatever format you want it.
Here Concatenate Example — NodePit you have an example of that node
Hi @shiromys , as @knimediger says, there is no need for a loop in this instance but if you are wanting to use this as an example of how looping works… Firstly, this might be a silly question but you have got a loop end node in your workflow haven’t you? It’s just you didn’t mention it. You would join a Loop End node after the CSV Reader. You could also replace your combination of Group Loop Start and Table Row to Variable with a single Table Row to Variable Loop Start node.
The output from the Loop End node should be a table containing your combined csv data.
@knimediger, thank you for the response. The files I have are having different headings.So, I am assuming that concatenate can not be used? I am a beginner and it’s a task provided for my first project. So unable to proceed further without this step.
@takbb Thank you. I didn’t add the end loop as the start node displayed only one file path. Adding the end loop worked.
@knimediger model worked with adding an end loop.
hi @shiromys , I’m glad you got it working but I’m surprised you’d be wanting to concatenate two csv files that don’t have the same columns. Are you sure you weren’t supposed to be joining them rather than concatenating?
@takbb I am not sure about it.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.