Linq query and Excel

I have 2 Excel sheets. In the 1st excel i have the headers as month names (jan-feb) and i have to copy the values from 1st column of 2nd excel and paste it under the respective month name in the 1st excel(like if it’s July month then i have to paste the values under the header July in 1st sheet).is there any query for pasting the values for dynamically changing row number or is there any other methods for doing the same

You don’t paste into Excel. Read Range both into datatables, work with the data in the datatables, then write it back to Excel.

Can you elaborate more

@Amruta_George1 Can you share the sample input file

DT1.AsEnumerable().Where(Function(row) Not DT2.AsEnumerable().Where(function(row) row(“Month”).ToString.Equals(row(“July”).ToString) and row(“Colmn_Name2”).ToString.Equals(row(“Value”).ToString)).Any).CopyToDataTable

These are the 2 Excel files

In the 2st excel i have only employee code.i have to read that and paste it in the 2nd excel under the respective month