Split large excel file into files with 1000 lines each

Hi Community!

I know there are similar topics talking about this, this one is a little bit different and it sounds really simple, but I haven’t been able to achieve it.

Imagine an excel file with 13k lines, I need to split it into files with 1000 lines each with no criteria needed to divide it, just 1000 lines.

I have tried using the table dimensions node and with the number of rows get the number of files I need to create (13k lines = 13 files), but this is all. Then I could use a loop but how? How can I exclude the recent lines used?

Appreciate any guidance :slight_smile:

I’d use the chunk loop start node, with a chunk size of 1000 rows.

You can create a filename using the Create File Name node and providing the currentIteration flow variable from the Chunk Loop Start node as the base file name.

An Excel Writer and Variable Loop End node complete the loop.



Thank you so much, it works perfectly, I hadn’t used or even read the description of the Chunk Loop Start, Knime has tons of nodes.

My final solution looks like this, I couldn’t find the String to Path (Variable) node, I should update my Knime version, but I manage to use the variable as a simple string.


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