Loop to Read Range in Excel

Hi all,

Is there a way to read a range in excel looping through the rows ? I need to read the rows and create a datatable using 100 rows every time, for example, If my input file contains 400 rows, the loop should move like this inside the Range

1 Loop: “A1:A100”
2 Loop: “A101:A200”
3 Loop: “A201:A300”
4 Loop: “A301:A400”

Also, It should use variables, so far I’m using “A”+VarStart + “1:A” + VarEnd for the syntax but I don’t know how to increase the variables to position in the right cell. Any idea would be greatly appreciated.

Hi @Armando_Urzua
U can increment the VarStart by 100 using assign activiti
VarStart= VarStrat+100

Like that u can do for other variable too after read range

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

Thank you @NIVED_NAMBIAR , however with that solution the first loop starts in the 101 row. I’m having troubles with how to create the first loop starting in position 1 and then moving to the next 100.

Before starting loop

Intialise VarStart =1

VarEnd= 1

Then after read range in loop, use assign activitiy to increment both by 100 as I told above response

Regards

Nived N :robot::robot:

Happy Automation :relaxed::relaxed:

Hi @NIVED_NAMBIAR , Not really, the solution you provided increments by 100 the same number, so in the first loop the VarStart is 100 and the VarEnd is 100…In the first lap of the loop the VarStart should be 1 and the VarEnd 100, how do I make the VarStart = 1 in the first loop ? Thanks !