I need to compare the two DT: DT1(Master) and DT2(Updated) by using Linkq
if i am having the EmpNO Column in the Two table then i need to compare the excel if updated Excel with master Excel.if the master having the EmpNo just leave it .if it is new one then updated in the master Excel.
can any one help me by script…
1 Like
Hi @keerthi_97
This might be helpful to you please read.
I could be wrong, but since you need to update a column with a new value, you will need to use atleast 1 loop for each table you need to update. If you didn’t need to update a value, then LINQ alone would work.
So, I think you can use a combination of LINQ and ForEach. - Note that ForEach loops have been improved to be much more efficient and use less resources. (like 10k rows only takes 1-2secs to loop through)
Here is an example:
If Not demo1.Columns.Contains("Status")
Add Data Column …
cheers
Happy learning
3 Likes
ppr
(Peter Preuss)
January 6, 2020, 2:16pm
3
@keerthi_97
As this Post is a fork have a look on your origin post. Here I have provided a demo xaml to you
@keerthi_97
Find a demo XAML here:
keerthi_97.xaml (11.4 KB)
I did a setup with dummy data but it should match to your structure as close as possible
The scenario of nonmatching rows or only new rows in Update Excel is initially incorporated.
Let us know your feedback