Hi all, my doubt is there are two Excel files like previous file and present file i want to compare the files and remove the same data present in previous file in present file can any body provide the solution
Use Remove Dupicates Activity under excel process scope in Modern Experience.
Check out this below thread too
It may help you.
Regards,
- Use the “For Each Row” activity to loop through each row in
dtPreviousFile
. - Inside the loop, use the “For Each Row” activity again to loop through each row in
dtPresentFile
. - Use an “If” condition to compare the data in the current rows from both data tables. You can use the column values or any unique identifier for comparison.
- If the data in the current rows of both data tables matches, use the “Remove Data Row” activity to remove the row from
dtPresentFile
. - After both loops, you will have
dtPresentFile
with the same data as the present file but with the data that was in the previous file removed.
regards,
Use this linq query:
filteredRows = dt1.AsEnumerable().Where(Function(row) Not dt2.AsEnumerable().Any(Function(prevRow) prevRow(commonColumn).ToString() = row(commonColumn).ToString())).CopyToDataTable()