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
imagepng

and

MeatStock.xlsx
imagepng

After merging:

imagepng

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


esProc Desktop and Excel Processing
4.7 Merge by column - different name and number of rows - keep only duplicate rows
4.9 Merge by row - convert file names to column values - unfixed number of files