Write cell & Stop Loop


I am trying to do the following,

  • write cell: how can i start from the 2nd cell of Column M as i have a header
  • loop: the robot continues to write cell even if its empty, i tried to add a break but it is not working.


Thanks in advance!

Hi @Wlearns

In write cell workbook there is a property add header check the property then it will write from the 2nd row.

Hope it helps!!


Specify the range in write cell workbook range you want to start from the 2nd cell of Column M
So in range “M2:End” to write the data in the excel

Thank you

Hi @mkankatala,

There is no header under properties

Hi @Wlearns
Before foreach Assign Counter=2
In Write cell give range as “M”+(Counter+1).tostring and increase the counter

Hi @Wlearns

You are giving row-column range in cell so it’s not working. Try giving the only cell value and increment the each row like below
Assign int_count = 2 (outside for each)
Give cell as “M”+int_count.tostring

Okay @Wlearns

Take a counter variable and take it as a int variable type. Assign the counter = 2
Give the range like this “M”+Counter
If you want to increment the row, increment the value of counter in for each row in datatable.

Condition -
In If conditon in then block give the counter value increment in assign activity, in else block give the write cell workbook activity and below that give the counter value increment in assign activity.

The above statement means if the cell is empty it will increment the row, if it has data it will write the cell.

Hope it helps!!

Hi all,

Thanks for your help and solutions! it worked!

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