0

I am new to the PowerShell world, and my need is very simple. I found this utility https://github.com/dfinke/ImportExcel that meets my need but I could not find a suitable exampe But I am struggling to find an answer.Any help is appreciated My data model is as follows

$leftCsv = @"
Column1,Column2,Id
1,2,10
11,22,100
"@ | ConvertFrom-Csv

$rightCsv = @"
Column3,Column4,Id
3,4,10
33,44,100
"@ | ConvertFrom-Csv

and the expected output is

Id,Column1,Column2,Column3,Column4
10,1,2,3,4
100,11,22,33,44

Thanks Sanchu

Sanchu Varkey
  • 49
  • 1
  • 5
  • Is this not essentially the exact same as https://stackoverflow.com/questions/69213006/powershell-updating-a-csv-file-based-from-a-csv-file-as-a-source that I answered earlier today? – TheMadTechnician Sep 16 '21 at 19:23
  • I think your answer is using plain PowerShell functions whereas my question is about resolving using this utility. https://github.com/dfinke/ImportExcel. Please forgive me if I am wrong – Sanchu Varkey Sep 16 '21 at 20:12
  • Either way you end up with an array of objects. The only difference is really loading and exporting the objects, now how you manipulate them. – TheMadTechnician Sep 16 '21 at 20:18
  • In my case the columns in both files are dynamic except a common column. I am from Linux world and this really looks Chinese to me – Sanchu Varkey Sep 16 '21 at 20:26

0 Answers0