How to read data from two different excel sheets and compare each cell

Hi,

I have two different excel sheets and i need to compare each cell from sheet A and sheet B if cell A1 in sheet A is equal to cell A1 in sheet B i need to update a new excel sheet cell A1 as true if its false then i have to update it as false. Please help me to resolve this.

Hi @yadish_s

Welcome again to UiPath Forum.

Please find the below screen shot. Try this method and let me know whether it meets your expectation.

image

Feel free to reach us at any time if you have doubts. Thanks.

Happy Automation

1 Like

Hi @vignesh.ks

Thank you for providing the solution.

I tried the same method as per the screen shot but my result sheet has multiple output.
Please find the below screenshot for reference.

sheet1

image

sheet 2
image

Result
image

Give break activity and try it. I attached screen shot for your reference.

Thanks

Thanks a lot this is working fine now.

Could you please let me know how to implement the same logic for multiple columns

Hi @yadish_s

Could you please elaborate more on this. Thanks.

I have column A, column b & column c of sheet1 i need to compare this with column A, column b & column c of sheet2 and print true or false in each cell in new excel

you can build logic like below.

row1(“yourColumnName”).ToString.Equals(row2(“yourColumnName”).ToString) and row1(“yourColumnName”).ToString.Equals(row2(“yourColumnName”).ToString) and
row1(“yourColumnName”).ToString.Equals(row2(“yourColumnName”).ToString)

Use And operator in if activity, it will validate all the given columns.

Thanks.

Hi @vignesh.ks

The data is been printed only in Column A where as i need the data to be printed in all columns. Please find the below screen shot as sample output.

image

Thank You

Hi @yadish_s

I have one doubt here. Do you need to validate each column separately and write true or false.

Or do you want to validate all the column values at once and write true or false.

Please confirm. Thanks.

Hi @vignesh.ks

I have two input sheets.

Sheet A
image

Sheet B
image

i need to compare these two sheet column by column separately and print the result as true or false in each cell of every column in result sheet. I have placed a sample result sheet below.

Sample result sheet
image

Thank you

Okay, Make build data table has 3 columns, like below:

image

And then, the workflow should be like this:

Give array row into add data row activity like this:

image

Thanks.

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