How can i compare 4 col from 1 excel to 4 col from another excel file having diff col names using LInq q query…please help??
Ben E. Keith Price Variance Detail (1).xlsx (106.7 KB)
2000194933-X071356.xls (5.6 MB)
@aparna30 -
Dt → Datatable
Where_Column → Condition Column name to check
Select_Column → Select Name to Print the data
Search_data → Search data
This will help to find whether the Record you are looking is Present or not.
Dt.AsEnumerable.Where(Function(row) row.Field(Of String)(“Where_Column”).Equals(Dt.AsEnumerable.Where(Function(row) row.Field(Of String)(“Where_Column”))).Count > 0
Select the Value to Print Somewhere:
Dt.AsEnumerable.Where(Function(row) row.Field(Of String)(“Where_Column”).Equals(Dt.AsEnumerable.Where(Function(row) row.Field(Of String)(“Where_Column”))).Select (Function(row) row.Field(Of String)(“Select_Column”)
Hi @aparna30 ,
Could you also let us know what is to be updated in the Comment
column and based on what conditions it should be updated.
For an initial check, we could check with Join Datatables
Activity and then loop over the Join Datatables
Output using For Each Row
Activity and using If
Activity we could perform the comparison and update the column Comment
accordingly.
More suggestions could be provided once a clear understanding of the requirement is provided.
In the “Ben E keith” file at the last I wanted to add “Comment” column based on condition colno 14 in Ben E Keith file > Col No 16 In another file thats the condition…If Its true then under comment I wanted to write “Overcharged”