Excel Reading in uipath

Hi everyone,

Suppose I have different type of users in excel such as
Type Login Password
admin *** ***
Employee *** **
Now, for type-admin in excel I should be able to enter login and username of admin in a web app
For that I first used open browser to open web app then a read range activity to read excel

-My question here is how to put conditions that “if it is admin then pick from excel login and password and enter it in app”

Thanks and Regards

1 Like

So you have to process for each user type?
If that is the case you can go for a forEach Datarow after your read range.
Inside this you can have a if condition that if row(“Type”).ToString = “admin” then you can you can have the app login sequence and there in the typeinto you can take row(“Login”).ToString and row(“Password”).ToString

Hi @supu123

You can do it by using a Read Range activity first to capture the data of the excel into a datatable.

if you are only using the admin type, you can filter that datatable using datatable functions in an assign activity
dt_exceldata.select(“Type = ‘Admin’”)

This will get inserted to a datarow type variable. Then you can loop through it to easily get the username and password.

Or else

If you are going to use different stuff for each user type, you can use the datatable you used in your read range, and create a for each loop

Within that, you may be able to use the Switch activity to execute different tasks based on a specific condition…

1 Like
  1. you have to read the excel using read range activity
  2. From the datatable you have to filter the data using select Statement(datatable.select(“Type=‘Admin’”).
  3. output will be array of datarow
  4. from that you have to loop that datarow using some validation(If) to find whether admin is available or not
  5. If avialable you can get the data using the coloumn headers or row Numbers(row(0).tostring or Row(“Type”).tostring)
  6. Finally you can assign the output to some variable and pass it on to the workflow whereever its required