I have an Excel file that has a column with three different values. I want Ui to read that value for each row. If the value is “a” I want ui to take the value from another column in that row and write it into an external program.
Right now I used (as in the attached screenshot) Excel application scope, do, for each row read cell but this doesn’t seem to be the right way.
Create one variable with datatype string whose value you are looking for and one variable with datatype datatable
Use Read range activity , store the value in output - datatable.
take for each row activity .
take if activity , put condition ,if it is true -
Assign String variable = row(“column name”). tostring
you will be having your desire result in string variable .
Column name - here will be the second column whose Value you want .
We can do this using query also . Firstly try this and let me know if you face any issue.
iterate Datable through for each row
flag = 0
If row(“a”).equals(“a”)
then flag = 1
End If
if flag = 1
assign requiredValue = row("b”).Tostring
End If
End For Each
This workflow will read an excel file data.
It will show the person phone number at column D if the person age above 40.
And if the person below 40 it will show the email at worksheet column C.
Hey,
I modified this workflow and attached a screenshot. Sadly it doesn’t recognice the if … is Adressänderung -Ort- and does the else action for every row. Is the if… is… wrong?