CSV- add empty columns
hello
i have csv 1500 record
"cognome","numero 1","numero 2"
and need add empty columns
[empty col.][empty col.][empty col.][empty col.][cognome][empty col.]...[numero 1][empty col.][empty col.]...[numero 2][empty col.][empty col.]...
total 60 columns
just copy , paste ps console window, or ise:
$newheader = "azienda","titolo","nome","cognome","indirizzo","cap","citta","stato","email","url","note","nome 1","numero 1","numero breve 1","deviazione 1","note 1","nome 2","numero 2","numero breve 2","deviazione 2","note 2","nome 3","numero 3","numero breve 3","deviazione 3","note 3","nome 4","numero 4","numero breve 4","deviazione 4","note 4","nome 5","numero 5","numero breve 5","deviazione 5","note 5","nome 6","numero 6","numero breve 6","deviazione 6","note 6","nome 7","numero 7","numero breve 7","deviazione 7","note 7","nome 8","numero 8","numero breve 8","deviazione 8","note 8","nome 9","numero 9","numero breve 9","deviazione 9","note 9","nome 10","numero 10","numero breve 10","deviazione 10","note 10" import-csv $inputfile | foreach { $_ | select $newheader } | export-csv $outputfile
you'll need set $inputfile , $outputfile variables paths of old , new csv files.
[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Windows Server > Windows PowerShell
Comments
Post a Comment