How can I loop to read all columns on a sheet and paste them into a field on another sheet?

Hello, i’m trying to read all columns in one sheet and paste it to column on another sheet and complete an operation for each column.I want to read column “A” from the “Unity” sheet and paste column “B” of the “Results” sheet, then I will start an action for column B and get a result. After getting the result, I want to do this for all columns in “Unity” sheet. How can I do this?

@Bekir_Turkekul, please follow the below-mentioned steps:

  1. Read the Unity sheet.
  2. Read the Results sheet.
  3. Use a For Each activity, change its type to System.Data.DataColumn and iterate through the columns in the UnityDT like UnityDT.Columns.
  4. Use an Add Data Column activity and pass the column (object from the for loop), to the ResultDT.
  5. Use the Invoke Method with the method name as SetOrdinal to change the column’s position.

Hope this helps!

1 Like