I have .csv like that:
but many more lines of course.. (sorry I have added it like picture because text was not able to be formatted correctly)
and I would like to have 4 .csv files like which contains every column separatelly so in x.csv, I will only have data from first column. in y.csv I will have only data from second column (they are separated by ";"
so far I have this code but I'm not able to even loop through columns (looping through rows works..)
$dataaa = Import-Csv ".\input.csv" -Delimiter ";" | Group ID | %{
$ID=".\out.csv" -f $_.Name
$_.Group | export-csv "$CurDir\$ID" -NoType
}
$a=0
echo "$a"
$Results = foreach( $Column in $dataaa ){
$a=$a+1
echo "$a" #echo number of column
#select first column and export into x.csv - have NO idea how to
}
echo "$a"
thank you for your help
