Table row to Variable Loop - result in duplicated * Files count (KNIME 4.4.1)

HI Everyone,

I am learning to use KNIME to help my work, such a great tools.

When I try to copy multiple excel from each individual files (file count A) into one files, I got the result duplicated to my file count A, for example, if i have 5 files to combine, then I will got the row count duplicated* 5, if 10 files then row count duplicated for 10 times…

That is really annoying to me, may I know which part was wrong please?

Thanks in advance

Knime Question

1 Like

Hi,
your current selection always points to default_1 for the select sheet with name. You need to use the variable which is created by the loop and use this for your sheet name in the Flow Variables Tab

best regards
Dan

2 Likes

@Fovas welcome to the knime forum.

It is about the setting “Files in Folders” which would load every file in the folder and in your case would do it 5 times. Hence the duplicates.

The excel reader can import all excel files from one folder at once given they have the same structure without the loop. If you want so use the loop you would have to select the settings for a single file.

3 Likes

Thanks Daniel, Thanks Mlauber71,

Can you elaborate more how to do the proper setting here?

For the Variable Loop Start, i didnt change anything, i just drag and drop and connected it.

While for the Excel reader, i cant really pick (or i dont know how to) pick the variable here…

Here is the configuration, that i used currently

Either you just provide the path where the files are without the loop or you would use the loop and import every single file on its own:

Since we are at it I would also recommend the file handling guide which is long but you would get important insights how knime does handle files.

https://docs.knime.com/latest/analytics_platform_file_handling_guide/index.html#introduction

You might also take a look at this short video

3 Likes

HI Mlauber71

Thanks for your swift reply and the video, I removed the loop as you suggested and it works like a charm (and I LOL’ed at the same time in front of my PC, how i over-complicated things.)

Thanks very much for all the help again!

2 Likes

Glad you found a solution. With knime there are often several ways to do things. And while you learn you discover new ways to do stuff which does not mean something else is wrong.

Over engineering can be fun :slight_smile:

And since we are at it. Concerning importing and handling excel files - there is a whole world to discover what you can do:

3 Likes

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