Hey guys,
I have written a script to import some data from a CSV file based on some criteria i was given and which works great but I now have some additional requirements that I am struggling with, being the noob that I am, and insisting on learning things the hard way.
$date = get-date -format ddMMyyhhmmss
$header = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51
Import-Csv -header $header C:\temp\source.csv | Group-Object "1","4","7" | ForEach-Object {$_.group[0]} | Export-Csv c:\temp\001Products$date.csv -NoTypeInformationSo the above works great for the requirements i was given but it turns out the program receiving the file doesn't like the header row being present or the lowercase "y"s and "n"s.
I wont bore you with all the ways I have tried and failed to make this work.
Can I get some pointers?
Thanks in advance.