Replace Column one Excel to another Excel

@MD_Farhan1

Yes These are the columns You have to check in your 2 datatables Same or not.I said that if your 2nd datatable contains 4 Columns and your 1st datatable contains 2 columns then it will dynamically updates the 1st datatable with 4 columns .

Can you explain on what basis you want to enter the new datatable data to the old datatable…

Hi @MD_Farhan1

For Example:
dtOld datatable
image

dtnew datatable:
image

Query:

dtOld= (From rowOld In dtOld.AsEnumerable()
            Join rowNew In dtNew.AsEnumerable()
            On rowOld("Name").ToString() Equals rowNew("Name").ToString() And rowOld("Address").ToString() Equals rowNew("Address").ToString()
            Select dtNew.Clone().Rows.Add({rowNew("Name"), rowNew("Address"), rowNew("Department")})).CopyToDataTable()

updated datatable will have
image

Regards