Need to compare CSV data base and Xlsx Input and get information from database and store in to separate output

Hi All,

I receive two Excel file 1. CSV file having all the data. 2. xlsx file format having Emp_Id in CSV file i have lot of data like more than 50,000 data i need to compare both the file and find the location which we have input in xlsx format (Emp_id)

Which one is fast and accurate look up data table or LINQ?

Can u please suggest and give a LINQ or lookupdata table steps please.
Input:

Output:
image

Thanks
Vicky

@Vicky_K

use 2 assign activitys

converting the first datatable to dictionary

dict_cityvalues=dt1.AsEnumerable.ToDictionary(Function(a) a(0).ToString,Function(a) a(1).ToString)
dt2.AsEnumerable.Select(Function(a) dt2.Clone.LoadDataRow({a(0).ToString,if(dict_Cityvalues.Keys.Contains(a(0).ToString),dict_Cityvalues(a(0).ToString),"NA")},False)).CopyToDataTable

Read both into datatables and then use Join Data Table

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