For each row in Excel file

I have an excel file - I would like the bot to for each row assign the cell in column a to a variable and the cell in column b to another variable. I am unsure how to configure the assign to achieve this?

@E.T.S

hi

use for each row in datatable
inside

use two assign activities

variable1=currentrow(“ColumnName”).tostring
variable2=currentrow(“ColumnName”).tostring

columnname you can mention your column Names
cheers

1 Like

Hi @E.T.S

Please use the following approach:

Inside the For Each row activity, take 2 Assign activities:

columnAData = row("Column A Name").ToString

columnBData = row("Column B Name").ToString

In this way, you will have the column a value & column b value in every respective iteration.

Hope this helps,
Best Regards.

1 Like

Hi @E.T.S

  1. Use Read range activity to read the excel file and store it in the Datatable.

  2. Use For Each Row in Data Table activity and pass the datatable name.

Regards
Gokul

1 Like

Thank you that solved it!

1 Like

Thank you everyone for your help!

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