How do to count number of rows Excel files in multiple folder

Hi Team,

How do I count the Number of Rows of Each excel file in folder

Nune Ashok

The Excel Reader has an option to read all files in a folder. Then, optionally, under the “Advanced” tab of its configuration, you can select to append the file path to each row. Then you can use GroupBy:

  • Without any group columns to aggregate the whole big table, or
  • With the path as group column if you want to get the number of lines in each file.

In the “manual aggregation” tab you can select “count” as aggregation method.
Kind regards,

1 Like

Thank you, Alex, for the information can you please share Workflow.

Nune Ashok

Hi guys, a make this silly flow…


First I list all files/needs to catch the paths

Then I make a loop using chunk to read file by file with excel reader adding the path option to insert a column with the complete file name.


After that, using group by node, I could count the path column and add the first information to register the file name.



Thats it…




Thank you for the Workflow Denis

Nicely explained @denisfi, and I think this is a good general solution where the excel files in the folder are of varying data formats, whereas the solution described by @AlexanderFillbrunn doesn’t require the loop nodes but I think would work where all of the excel files in the folder are of the same table format.

Incidentally, an alternative to using the Chunk Loop Start plus Table Row to Variable combination is to replace those two nodes with a Table Row to Variable Loop Start, which will do the same job.

@Ashok121 , if you are happy that your question had been answered then please can you tick the “solution” button underneath the relevant post above so that we can see on the forum list that it has been resolved and others can quickly find the solution. Thanks.

Sorry @Ashok121 , but i think @denisfi 's post should be marked as the solution. Only one post can be marked as such.

1 Like

Actually, i am new to Knime i am exploring all things in it
Thank you

1 Like

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