Hello everyone,
I hope anyone can help me with my problem.
I want to loop through a large data table in Excel, to take first 50 rows, add them in another Excle and then to repeat the same with the next 50 rows, and so on.
I managed to take the first 50 rows and save them in a new excel file, but that’s all.
I am not sure how to handle the next 50 and then the next 50 results.
I am actually thinking is it possible to run the bot, and to have all files saved at one on different Excel files.
Thank you, @putera.timmy ! all of this was helpful.
I managed to loop through every N items and store them in separate Excel Tables.
However, I get only 2 tables:
Table1 - first 10 items
Table2 - next 10 items
Then the process ends. The rest of the excel file (the other rows) are not being used(looped through).
int_range = Convert.ToInt32(Math.Ceiling(dt_2.Rows.Count / SegmentSize))
*SegmentSize is N items mine is 10, int_range and segmentsize both is integer type