Copy pasting from excel to another sheet

Hi Guys,

I’m struggling to complete the following objective:
In Column E of a spreadsheet, I need to copy paste value E2 to another screen, perform a set of actions, then repeat for E3,E4,E5… etc. cell.

How would I go about doing this?


  1. Use Read Range activity to read the data from excel file and will give you output as DataTable and say ‘DT’

  2. Then use ForEach Row activity to iterate that DataTable.

                  ForEach Row in DT
                     read row(4).ToString 
                     perform actions.
1 Like

What activity is this?


As you mentioned, you want to pass this value to another screen right. You can directly write this value there else assign it to one string variable and pass it there.

                 String value = row(4).ToString

And then perform your actions. Once it done and will take next value and process it as it is in loop.

1 Like

Thanks for all your advice so far. This is what I have for a workflow - having some trouble understanding how to pass the value through. What do I put in For each Row Body?

hi @richardli23

Use Assign Activity inside for each row

strvalue= row(4).ToString


1 Like


use Assign Activity, String value = row(4).ToString

And also in Read Range activity, simply specify empty double quotes and it will read all data from excel.

1 Like

Thanks guys, I got it to write the value.

The issue I am having is:

  1. It’s taking the last value on row 4, how do I get it to point to a specific cell
  2. How do I have it move down 1 cell and repeat the same actions?

This is my work flow right now

1 Like


You have to place Type Into activity also inside ForEach Row. But you placed outside of the loop. Because of that it is iterating all rows and it contains last row item only and then it is writing same.

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