Created
December 12, 2022 18:18
-
-
Save sannae/3de380638ff20716359433b32140afb7 to your computer and use it in GitHub Desktop.
Adds a new column to an existing CSV file by specifying NewColumnTitle and NewColumnValue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$NewColumnTitle = 'GRUPPODIP' | |
$NewColumnValue = '' | |
Import-csv anagrafica.csv | | |
Select-object *, @{Name=$NewColumnTitle; Expression={$NewColumnValue}} | | |
ConvertTo-csv -Delimiter ';' -NoTypeInformation | | |
Foreach-Object { $_.Replace('"','') } | | |
out-file anagrafica_GRUPPI.csv -encoding UTF8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment