...
4.17 Merge and de-duplicate by column - duplicate column names - keep data in columns that appear later
Before merging:
CustomerFruits.xlsx
and
CustomerMeats.xlsx
It can be seen from the figures that the Bread columns are duplicated, and we want to keep the Bread field of the second file and delete the Bread field in the first file after merging. The result is as follows:
Script:
A | |
---|---|
1 | =file(“CustomerFruits.xlsx”).xlsimport@t() |
2 | =file(“CustomerMeats.xlsx”).xlsimport@t() |
3 | =A1.new(Name,Apple,Strawberry,Peach,A2(#).Mutton,A2(#).Pork,A2(#).Bread,A2(#).Duck) |
4 | =file(“CustomerFoods.xlsx”).xlsexport@t(A3) |