Write cell (Workbook activity)

My robot has write cell activity inside a for each row in datatable . But it is writing same value for first two rows(in excel) and then for another iteration it replacing the old value with new value in very same place…I’ll tell you what i have done.
Created a variable named Counter Int type
Counter = Counter+2
In write cell range I have given “D”+Counter.ToString
And for the ‘for-each-row i have set the index to Counter’

Please help me what’s wrong…or suggest a work-around

Use Append Range, not Write Cell.

Sure will try

FYI the point is you don’t have to define the range for Append Range. It’ll automatically add it to the end of existing data in the spreadsheet.

Hello @jeevan.sharat ,

If you are using counter you need to initiative it. Check in variables panel whether you have provided any Default value to it.else add the default value.

Also are you trying to start from the 2nd row??then you can provide the default value for counter as 1 and increment counter=counter+1