divide in multiple sheets a table by a certain mumber of rows

hi

i have a table with header with 331248 rows. i would like an output of more or less 33 files with everyone 10003 rows (10002 row + 1 same header)

one way is to use row splitter setting 10002 “include rows by number”, but i have to do it for 33 times more or less…and for each splitted tabel i have to add a excel writer for each node

is there a way like loop to generate 33 different file?

Thanks so much

Hello @Pippobaudo89

I would go for a ‘Math Formula’ node with the following math, aiming to create a ‘file sequence code’:

ceil($$ROWINDEX$$ / 10002)

Then a ‘Group Loop Start’ iterating on just created ‘file sequence code’, saving the files within the loop…

BR

thanks but how can i save multiple file? excel writer in the loop and i select the “append” option in the writing flag?

Hi @Pippobaudo89

Have a look at this workflow.
Maybe it helps you.

Br

2 Likes

Hello @Pippobaudo89
This is expanding the initial scope of the topic.

With the file sequence code you can create the path and file names, and then convert to Path format type; aiming to feed them as variable for the writer node.

Does it sounds familiar to you? or do you need a sample workflow? I guess there will be some of them already in Hub

btw, @Pippobaudo89, there is also the Chunk Loop in which you can specify either rows per chunk, or the total number of chunks (e.g. 33) to output, which could equally be used with @gonhaddock 's suggested workflow.

2 Likes

You 're always right Mr @takbb , I forgot it

However with the proposed method, you’ll get the step code aiming to build the path name.

I guess this is just the starting point, as the scope of this topic is still uncertain.

BR

2 Likes

Yes true, there are different options for building the file name depending on the type of loop used. (Always a trade off :wink: ) I was thinking with the chunk loop you could use the iteration counter to provide sequential filenames.
e.g. something like this in a String Manipulation (Variable) node
join("c:/temp/myfile", string($${IcurrentIteration}$$) ,".xlsx")

(and… I’m not always right :wink: !!
As I once heard "for example there was an occasion time when I thought I was wrong, and it turned out I was wrong about being wrong :rofl: )

2 Likes

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