Comparing two excels and writing the output to new excel file

@Yoichi

can any one help me

inputs

final output

image

HI,

Can you elaborate? Do you mean need to remove rows in the second table which exists in the first table?

Regards,

@Yes

I tried with 2 for each activity

Is there any linq?

Hi @Shiva_Nikhil ,
My way
get differ form 2 file.xaml (21.4 KB)
input


my output
image
regards,
LNV

1 Like

Hi,

Can you try the following?

dt2.AsEnumerable.Except(dt1.AsEnumerable,data.DataRowComparer.Default).CopyToDataTable

Sample20230823-5L.zip (9.2 KB)

Regards,

1 Like

@Yoichi

thanks i tries with

dt1.AsEnumerable.Except(dt2.AsEnumerable,system.Data.DataRowComparer.Default).CopyToDataTable

I encounteres ad no datarow

now i have got the expected output

thanks @Nguyen_Van_Luong1

2 Likes

FYI, If there is possibility no rows exist in result, the following help you.

arrDr = dt2.AsEnumerable.Except(dt1.AsEnumerable,data.DataRowComparer.Default).ToArray

Regards,

2 Likes

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