Merge excel data comparing column name

Hi,
In my case, there are 2 excel files. I need compare the headers similar in those files. i need to take the data and post that in the 2nd sheet.
ex:
Sheet 1: Country Name, Date, Invoice Number, Taxed Amount, Total amount
Sheet 2: Alternate Invoice Ref Credit Note, Invoice Number, Super Region, Country,
Date, Supplier Ref, Invoice Amount with tax, Invoice amount without tax
I need to update the sheet 2 with the data in sheet 1.
please help me with this.
Cheers :handshake:

Needs more context, I see there are common columns on both sheets. Does both sheet already has content or sheet2 has blank content that has to be filled with sheet1 contents. Or sheet2 also has contents and then maybe using Invoice number, update the respective columns with regards to data in matching invoice number from sheet1.

i am getting the fresh data in 1 excel and update in other excel file. so the 2 nd excel already has some data. but in 1 st excel file all the columns are next to each other. but in 2 nd excel i need to post them in their respective column.
Hope you can understand…

In that case, read range both sheets.
dtSheet1 and dtSheet2
For each row of dtSheet2, Lookup datatable dtSheet1 using CurrentRow(“Invoice Number”).ToString as the lookupvalue and looking at Invoice number column of dtSheet1, take the index as the output/result.
If intFoundIndex <> -1 then assign the values from dtSheet1 to respective cells in dtSheet2 for example
CurrentRow(“Country”) = dtSheet1(intFoundIndex)(“Country Name”).ToString

But take note that this is in assumption that your invoice numbers are unique in Sheet1

Hi,
I can’t quite understand this. can you please show it with a SC of workflow or maybe a actual flow could be helpful

Give me excel sample

I am attaching the excel formats
Data1.xlsx (8.8 KB)
Data2.xlsx (9.5 KB)