Compare two excel datatables and update

Hi, I have two datatables dt1 and dt2 namely. I want to reconcile(compare) values of certain columns between two datatables and Update status. Along with Updating status I want to read values from dt1 specific column and write it to dt2’s column . Can anyone suggest a linq query to do so as Write Range is taking alot of time.

Hi can Anyone please provide any inputs

I am not clear on what you’re trying to accomplish? Which columns are being compared. Do you want to find rows where dt1 = dt2 and if so, update a column named “status” in dt2? What have you attempted so far?

Hey @Dave glad that you responded ! Can you see the attached screenshots in the previous post? From the screenshot 1 - I want to filter a column namely Atlantis Version based on values from A/C No column from Screenshot 2- Now from the filtered Datatable which I have in screenshot1 - I want to read all the Sequence Number’s and write it to Screenshot2 Datatable. So its like I want to filter dt1–> read values from filtered datatable and write data to datatable 2 .

Is there any way to write data to excel without looping ? Append range is taking a lot of time

you can read the whole datatable and then write the whole datatable to the sheet using write range

@TimK - I dont want to read whole datatable, I want to read specific column from a filtered Datatable write it to another excel. Within same loop I need to write data for next filtered Datatable.