error in reading multiple excel files

hello I have multiple files in a folder to read into a workflow. I have created a metanode which contains the list files, table row to variable loop start, excel reader and loop end. this runs but when I write the table into an excel file, I find that only 1 of the data sets is read and it is repeated the same number of times as there are excel files in the folder.
For example, if there are 5 excel files in the folder, the data set is repeated 4 times and so, it appears 5 times in total
Any idea on how to read the right data and not have 1 dataset repeated? Thank you!

Hi @tdjebah,
welcome to the KNIME Forum. This happened to me many times and every single time it was because I forgot to configure the File Reader or Excel Reader to actually use the URL from the flow variable as input file. Can you double check that?
Kind regards
Alexander

Hi Alexander,

I used the URL from the variable connection of the ‘table row to variable loop start’ but it still just repeats only 1 data set.
I do this by running the ‘table row to variable loop start’ node and then copying and pasting the URL from the variable connection.
Is there a different way to do this?

Hi @tdjebah,
that does not work, as the URL is then just used in every iteration. You have to “wire” the Reader correctly. Right click on the node and click “Show Flow Variable Ports”, then connect the top left red port to the flow variable output of the table row to variable loop start. Now in the Reader’s dialog click the flow variable button next to the input field for the file to read and enable “Use variable”. Then select the URL variable in the box next to it. After that, the reader is correctly configured in every iteration, using the appropriate URL from the current row.
Kind regards
Alexander

1 Like

Hi Alexander,

Thank you very much, it works!

Hello tdjebah,
check out the KNIME Analytics Platform 4.1 which we just released last week. With this release the new Excel Reader can now read directly several files from a given folder.


So you no longer need to use the looping nodes to do so. Let us know what you think about it.
Bye
Tobias

3 Likes

Hi Tobias,

Thank you so much! I didn’t realise that had been implemented in the new version, it has definitely really helped.

Best,
T

1 Like

Hi T,
I’m glad the new functionality helped you. The Excel Reader and Writer nodes are only the start to gather feedback from you as our users. We will continue to migrate more reader and writer nodes with the next releases and then also make a proper announcement of the new functionality :slight_smile:
Bye
Tobias

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