...
4.8 Merge by column - different name, number and order of rows - keep only rows of the first file and align the rows
Before merging:
Meats.xlsx
and
MeatStock.xlsx
After merging:
Script:
A | |
---|---|
1 | =file(“Meats.xlsx”).xlsimport@t() |
2 | =file(“MeatStock.xlsx”).xlsimport@t() |
3 | =join@1(A1:Price,Name;A2:Stock,Name) |
4 | =A3.new([Price.Name,Stock.Name].ifn():Name,Stock.Stock,Stock.MinimumStock,Price.UnitPrice) |
5 | =file(“MeatsPriceStock.xlsx”).xlsexport@t(A4) |
A3: @1 option is left join, note that here is the number “1” rather than the letter “l”
A4: ifn() means selecting non-null Name values