how can i do this i have 2 excels
data1 : has lot of data
D2 : has few
now i want to remove that transaction i.e D2 data to be removed from new and rest to saved in new
how can i do this i have 2 excels
data1 : has lot of data
D2 : has few
now i want to remove that transaction i.e D2 data to be removed from new and rest to saved in new
Assumption: 1 column as the samples show
Assign activity:
dtResult = dt1.AsEnumerable(dt2.AsEnumerable, DataRowComparer.Default).CopyToDataTable
Please try this
dt1.AsEnumerable().Except(dt2.AsEnumerable(),System.Data.DataRowComparer.Default).CopyToDataTable
Has to be used in assign…and of left have a datatable
cheers
in Addition to above, when the datatable has more columns but we have to check only on column, it can be modelled as a isMatch case, without for each loop modelling:
Assign activity:
dtResult =
(From d in dt1.AsEnumerable
Let c = d("Column1").toString.Trim
Where Not dt2.AsEnumerable.Any(Function (x) x("Column1").toString.Trim.Equals(c))
Select r = d).CopytoDataTable
Handling empty filter results:
[FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum
dtresult will be of which type @ppr
Datatype: DataTable
getting error asEumerable not a member @Chirag_Shetty_Divakar @ppr
Sorry @ppr @manoj_verma1
It should have been From r In dt2.AsEnumerable istead of From r In dt2.AsEnumerable mybad.
Regards.
AsEnumerable is the method name
You can fix it by adding the Assembly Reference manually in your xaml file:
Simply open the file in Notepad and create new line with this String:
<AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
Then reopen your project and the error should be gone.
Cheers.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.