Reading multiple files using loops

This workflow demonstrates how to read multiple files using a loop.


This is a companion discussion topic for the original entry at https://kni.me/w/UPm1nNWmew1uu2L0

Hi, i am trying to use this functionality to make 20 excel files with the same structure into one excel, one table below the other in the same sheet.
Could you please provide some guidance?
Followed this steps i found on another forum, but the loop end is giving me an error…:

  1. “Use List Files” node and point to folder where files are located
  2. Add “Table Row To Variable Loop Start” node
  3. For csv, add CSV Reader: right click \ click on configure \ click on the flow variable icon right to browse \ click use variable \ select Location in the drop down option then ok and apply.
  4. Connect the “Table Row To Start” node to “CSV Reader” : drag a red line starting from the red dot of the “variable” node to the top of the “CSV Reader”
  5. Add a “Loop End” node

Hi @ElsaMarie -

Check out this thread - I think the included workflow is very close to what you’re trying to do. :slight_smile:

Thanks, the workflow worked, however, i’m missing data from the first column from the files… :frowning:

I would encourage you to make a post in the main KNIME AP forum, and if you can, include your workflow (or at least a sample that presents your problem). Those posts get a lot more visibility than these individual threads that are associated with Hub workflows.

Untitled
I’m using the following workflow to import 10 *. csv files with the same structure but I’m not understanding what options to set for Node 7. In the example they use Variable Settings - Use Variable - URL. I don’t have that option all I have are currentIteration, maxIterations, and knime.workspace.

Hi there -

It looks like your question is being addressed in a post on the main Analytics Platform forum. Let’s keep the conversation going there: Merging several *.csv files

Hi, I try to read and merge multiple files with slightly different format by using loops. It worked easily with the former xls reader by setting the location as variable: the xls reader extended the database with new columns for the ones that were not in the same format as in the first file.

So far I could not reach the same result with the new xls reader. I have error if the files are not in the same format. How can I come to the same result? I can not read and adjust the files individually because there are too many of them.