Take record from excel

Hi friends,
I have an excel from from that i have a column “Mobile number and name”.
here i have to check whether the mobile number is present or not for corresponding name.
how i do.

1 Like

@Rup_1 You can achieve this by using Excel Macros. However, if you want to do this entirely from UiPath, use Excel Activities. Excel Activities contain an activity called Read Range which will read the range for you and the result is stored in a data table. For a given name you can iterate through the data table to see if it is associated with a phone number.

Refer the documentation of Excel Activities.

Useful links

1 Like

Thanks for response.
first i read the excel and store it into datatable. i am able to fetch record but what condition should be used to match phone number with name…

here is the excel for your refer.
here i want to check whether the mobile number is present or not for name A,B,C etc
image

@Rup_1 Once you have the data table, you can loop through each row using a for each activity. Store the name in a variable and in the loop check if name of the current row matches your name stored in the variable. Once you find a match find the mobile number in the row where match was found.

There are better options than looping through the data table such as DataTable Filter activity DataTable.Select etc. Have a look at the links below.

https://activities.uipath.com/docs/for-each-row

https://activities.uipath.com/docs/filter-data-table

Hi buddy… @Rup_1

Great…
You got an excel now and you are done till taking up with read range and store that to a datatable variable say out_dt…now need to check whether mobile no is there for a name or not…
Here comes your solution…

  1. Use a for each row loop with input out_dt
  2. Use a condition like
    Not string.isnulloremptyRow(“name”) and Not string.isnulloremptyRow(“mobile”)
    This will tell you whether column name and mobile has value or not…if it has value you can continue with then part or with else part…
  3. That’s all buddy you are all done

Hope this would help you
Cheers

1 Like

Is that working buddy

Cheeers.

1 Like

Hi buddy,
it works for me thank you so much.

1 Like

Thats amazing buddy… @Rup_1

Cheers…keep going…