Compare 2 table based on single column and update the values in sheet1 excel

Hi all,

How to match single columns from sheet 1 and sheet2 and update the sheet2 data into sheet1.
I tried full join, left join but not working.
image
sheet1
image
sheet2
Expected output.
image

Please help me. How to do this.
Thanks,
Lakshmi

Hey,

You can use merge Data Table Activity and please follow this vedio
it will help you

Thanks

Hi,

Please try this using Linq “(From x In dt1 Join y In dt2 On x(“Invoice Doc”).tostring Equals y(“Invoice Doc”).tostring
Select tempDt.clone.LoadDataRow(New Object(){x(“SD Order”).tostring,x(“Invoice Doc”).tostring,x(“VA03”).tostring,x(“Status”).tostring,x(“Status1”).tostring,y(“Pdf_data”).tostring},False)).CopyToDataTable”

1 Like

Hi @ahmad_sarrawi ,


Getting error , what changes i need to do.
Thanks,
Lakshmi

@Rounak_Kumar1 ,
I tried out this one. Getting this error.


What to do. Please help.
Thanks,
Lakshmi

Ok,

Please set the initial value for DT3: new System.Data.DataTable,
and create table with expcted columns

Hey,

Use this workflow
it is working for me
New folder.zip (10.1 KB)
Thanks,
Rounak

1 Like

Hi @Rounak_Kumar1 ,

I tried out and the particular file, I am getting this error.


What to do.
Thanks,
Lakshmi

Have you used my Zipped File Code which i have shared
Please check

Thanks

Yes I unzipped that file and executed by passing the different file with same headers.
Thanks,
Lakshmi

you are doing something wrong because my output is coming properly in Sheet 3
please verify the code and column name

Thanks

Hey,
this error comes because-

Typically happens when there is no value . Check for any null values

thanks

Hi @Rounak_Kumar1 ,
I checked, in that excel there is no null values.
And column names are same as the sample file.
Thanks,
Lakshmi

@ahmad_sarrawi ,
I tried by giving DT3 and created required columns in new sheet.
image
Getting this error.
Thanks,
Lakshmi

Hi @lakshmi.mp ,

As per error message It looks like you have not added a Additional column “Pdf_data” in DT3, if not added do add column and try again.

Regards,
Rohith

Hi @lakshmi.mp ,

Did you check this Post :

Regards,
Rohith

1 Like

Hi @lakshmi.mp ,

The Column name that you have provided here maybe not matching with the Column names present in the Datatable, Do Check the Column Names in the Debug Panel and what you have used in the Assign Activity.

Let us know if this did not help.

1 Like

@rohith.prabhu ,
“Pdf_data” column has been added in along with required columns, I tried out the above video but its not working.
Thanks,
Lakshmi

Hi @supermanPunch , @Rounak_Kumar1 , @rohith.prabhu , @ahmad_sarrawi .
Thanks a lot for helping, able to update the values to particular sheet.
Thank you so much.
Regards,
Lakshmi

1 Like

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