Check if data exist in one excel workbook to another

excel
activities

#1

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…


#2

@Tzky
Can you elaborate your requirement.

Regards,
Mahesh


#3

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.


#4

@Tzky
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.

Regards,
Mahesh


#5

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:


#6

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


#7

@Tzky
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.

Regards,
Mahesh


#8

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

.


#9

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

thanks!


#10

@Tzky
you missed double quotes for Reference Number.
"ReferenceNumber"

Regards,
Mahesh


#11

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:


#12

@Tzky
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

Regards,
Mahesh


#13

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?


#14

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

Regards,
Mahesh


#15

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.


#16

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


#17

@Tzky
Yes you can use in flow decision.

Regards,
Mahesh


#18

@Tzky
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.

Regards,
Mahesh


#19

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