Take every 7 rows

Hi all,

How can I take every 7 rows in an data table and output it to a new file (for each 7 rows) ?

Thanks!

Hi Jasper,

You can have a While loop and increment the index with 7. You do the loop while the index value is less than the number of rows in data table.

See attached example: Main.xaml (11.7 KB)

Regards
Silviu

Hi, I need to take every 7 rows not just the first row of the 7 row.
Thanks.

1 Like

Hi @jasperlzx,
Here i have attached the sample file. It has the sample.xlsx file . It contains the data. The robot split the each 7 rows as a single xlsx file.

File : 7 rows.zip (29.2 KB)

Regards
Balamurugan

Hi @balupad14

I have the same situation with some modification.
I have a excel file which have more than 100 email id. Now I want to send the email to all of them. What I want is

  1. Read first 5 or 6 row and convert them into a string with a semicolon, so that I can put this in β€œTo” section of the email. But the problem is if the length of this string is more than 255 characters then I want to remove the last row from the string. And send mail to the users which are there in the string.
  2. Now the automation should take next 5 or 6 rows and repeat the process.

I am able to covert the rows into string. Need your help to automate other decision making steps of the automation.