Check if data exist in one excel workbook to another



Hi! Very new with uipath and im starting with this simple project of mine…here is my current problem.

I have 2 workbook…one which is the database and one is a list which gets updated everyday…i want to check if the each data from the list workbook exist in the database workbook…if they exist then no process will be done…if they dont exist then it will be process and added to the database workbook…thanks…hopefully someone can help me with this…


Can you elaborate your requirement.



Hi mahesh, basically i want to compare if those incoming data (list workbook) already exist in the database workbook.if they dont exist i will process them else ignore them.


what is that list workbook, and can you explain what are allthe columns will be there and which columns you want to compare by sharing some excel screen shot as an example.



hi mahesh,
i have attached a screenshot of the sample file i have.DB%20Workbook

I will need to compare the rows in column A of List Workbook to rows of column A of DB Workbook. if a row doesnt exist then i process them.

thank you so much for the help and patience :slight_smile:


List%20Workbook this is the List Workbook (cant upload two image)


First read the DB excel and and list workBook in a seperate datatable variable dta and dtb, by using read range activity. check Add Headers Activity.

Run a For each row for your List Workbook
Then add one if condition
Inside If
(From p in dtb.Select()
Select Convert.ToString(p.Item("ReferenceNumber))).ToList.Contains(row(“ReferenceNumber”).ToString)

The above query will check the column of ReferenceNumber from list is present or not in your db column.



hi mahesh, i tried using the formula you gave but its giving me an error.



i know its asking too much…but can you show me a sample workflow of it? apologies if i am asking too much.



you missed double quotes for Reference Number.



Thanks mahesh for the help and patience…i will give this a try tom. By the way, how do i pass the results of the condition?
thanks :slight_smile:


No need to pass the results.
Do the process what you have to perform in then part if It contains otherwise do in else part



Ok lets say i want to write those that doesnt appear on my db workbook into a new workbook…do i just put the write range in the true box?


Better use Import Row method in Else Part
Because you want to add the rows which are not present.



hi mahesh, i can’t find the import row method in uipath? can teach me how to go about it? thank you :slight_smile:

PS: I was able to do it through add rows, but i want to know how this import method works if you can teach it to me :slight_smile: thank you so much for helping me.


hi mahesh…sorry i have another question…the formula you gave me…can i use that on a flow decision activity?


Yes you can use in flow decision.



You have to use Invoke method activity to use Import row method.

Please search in forum you can get several posts to know how to use Import method.



thank you so much for the help mahesh. i have posted another issue of mine…can take a look if you have any idea on how to approach it? i’m kinda stuck with the splitting the body of the email and put it into columns in excel