Assigning values in datatable to variables

I have a datatable with two separate columns. How would I be able to go through each row, and assign the value to a variable based on whether its in column A or column B?
I attached my example here:

So for example, the first row has:
Column A Column B
30-9910 50

How can I assign 30-9910 to one variable and 50 to a second variable, and then be able to do this for each row?

Buddy @mgartner

Kindly follow the below steps to get that done buddy

  1. Use Excel application scope activity
  2. Read range activity to read the table and get the output as datatable type variable named out_dt
  3. Use a for each row loop and pass this out_dt variable as input
  4. Inside the for each loop use a assign activity to get that assigned. Like this
    Variable_1 = row(0).ToString and
    variable_2 = row(1).ToString
  5. Then you can use this anywhere you want…
  6. Here row(0) and row(1) , 0 and 1 ar columnindex

Hope this would help you buddy…

Is that working buddy

yes it is, thank you

1 Like

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