[Solved] How to get RPA to read excel file and determine which task to perform

My excel file has different header such as “Status”, “Description”, “Date”. I have been wondering if RPA is able to do such tasks.

Example:
If the 2nd row of my excel file has the status “new”, RPA to copy the description into another web browser/application.
If the 3rd row of my excel file has the status “completed”, RPA to move on to the next row.

Hopefully someone can shed some lights. Have been reading online trying to understand.

Thanks

1 Like

Following the courses at https://academy.uipath.com will help a lot

Hi @Popo

Welcome to UiPath Community Buddy…Thats a great question to start with

Fine. So coming to the point, Kindly find the below suggestions that can solve your issues buddy…Its easy…

  1. Use a excel application to scope to get your excel file into studio. Pass input as your excel file path

  2. Inside this excel appicaton scope use an activity called Read range activity with input sheetname and leave the range empty or like “” as it is. Get the output from this activity named output_Dt of type datatable

3.Still being inside excel application scope use an activity called For each row. This loop activity can iterate through your datatable each datarow by datarow like each row by row…
Pass the input as your datatable variable from read range (output_dt).

  1. Inside the for each row loop use a if condition activity, with input condition like
    row(“Status”).Equals(“new”)
    While iterating through each row in for each row loop, as we mentioned the column name as “Status”, it will check all the rows in this column alone. So in that case when any row meets the value “new” with this if condition, inside the then part use a assign activity with left side as
    out_Description_Value = row(“Description”).ToString
    Leave the else part simply, as if the above condition fails it will get iterated with next row…
    Thus now we have got the description…we need to go to a web application to process this

  2. Now being inside the then part in if condition, use an activity called open browser if its some acitivities are to be performed in a browser or use open applicaton activity if its going to be performed in a Desktop application…Then within that container you can add any activity you want to perform buddy

6 . Thats all buddy you are all done…

Hope this would help you

Even better this xaml could help you
Sequence.xaml (11.9 KB)

Cheers

Is that working buddy… @Popo

If so kindly close this thread with right comment solution marked that could help others looking for ideas under your topic… else we can tweak a bit more with this issue to get resolved…

Cheers…

Hi @Palaniyappan

Thanks for the detailed guide and step by step explanation to me. However, i encounter some error. Have attached the xaml hopefully will gives a clearer pictureRead Excel File.xaml (10.3 KB)

1 Like

@Popo
Here is your xaml buddy, kindly let know if you need further help…i think you are almost done
Read Excel File.xaml (17.1 KB)

Cheers

is that working buddy @Popo

Cheers

Hi bro @Palaniyappan

I’m unable to see your xaml file as it shows me “activity could not be loaded because of errors in XAML”

Cheer!

No Worries Buddy @Popo sending you again

Here you go, a zipped folder of the project
Read excel.zip (3.2 KB)

Cheers

Is the activity visible now buddy

@Popo

Cheers

cant seems to see the activity fully @Palaniyappan

I have screenshots the error that i encountered… perhaps you could guide me on it pls.
Thanks much for your patience.read excel file.pdf (1.1 MB)

Alright buddy here is your screenshot buddy of the xaml that i attached

This was the sequence buddy, kindly let know if you face any issues buddy we can sort this out easily…

Cheers

thanks buddy! I managed to clear the exception! :slight_smile: @Palaniyappan

Thats amazing … @Popo

Kindly close this thread with the comment marked as solution that could help others looking for ideas under your topic

Cheers

@Palaniyappan bro, the bot seems to be capturing data even though the status is not ‘new’

Kindly send the xaml file that you have now buddy…lets sort this out

Cheers

@Palaniyappan here you go! Read Excel File v1.xaml (16.4 KB)

1 Like

@Popo

Sorry for the late reply buddy

Its resolved buddy and the reason was the application activities whre not inside the then part of if condition, where in then part only we applied the condition to take the description for status with new. As we didn’t keep there it passes through else part and took all the status’s description in open application activity

Here is the xaml
popo.zip (13.7 KB)

Cheers

@Palaniyappan thanks buddy

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