I want a powershell script which I can feed a mapping file to and a file of output (which both have different column headers). I want to create a new file which has the headers from the mapping file but input from the output file. Example attached:
In the zip file are three files.
1. cm1hr1_cm1hr1~[login to view URL] – this is the output file
2. [login to view URL] – the mapping file
3. [login to view URL] – the desired outcome
So the headers in the converted file will always be E1:end (in this case AK1) from the mapping file. We can also feed the powershell script the desired row to look at (in this case it’s CM1HR1 which is row 25).
For each of the headers in the converted file the script either needs to copy the column listed in row 25 (so for MATH_RES_IF (F1) it needs to copy column C_MATHRES_IF from the RAFM output for example). If the column is listed as ‘NotUsed’ then it just needs to add a column of 0s.
Hopefully that makes it clear?