Avatar of Fr. Vandecan
Fr. Vandecan
Flag for Belgium asked on

Export-Csv - why is PowerShell adding delimiter "" - how to avoid this

Export-Csv - why is PowerShell adding delimiter ""

Export-Csv -Path $CSVFile -Encoding UTF8 –delimiter ";" -NoTypeInformation

I have a csv file with this content (before Export)

24/07/2018 05:36;Create;02/11/2019 00:00;flastnamei;firstname;lastname;Stagiaire;SI;Job Coaching Bruxelles;FALSE;FALSE;TRUE;FALSE;TRUE;FALSE;FALSE;TRUE;;;

when i use the command

Export-Csv -Path $CSVFile -Encoding UTF8 –delimiter ";" -NoTypeInformation
the file is changed like this

"24/07/2018 05:36";"Create";"02/11/2019 00:00";"flastname";"firstname";"lastname";"Stagiaire";"SI";"Job Coaching Bruxelles";"FALSE";"FALSE";"TRUE";"FALSE";"TRUE";"FALSE";"FALSE";"TRUE";;"";""

"" are added which is really annoying….

why ???

Avatar of undefined
Last Comment
Fr. Vandecan

8/22/2022 - Mon



Export-Csv -Path $CSVFile -NoTypeInformation

Open in new window

Don't stipulate the delimiter or the encoding and see how you get on. If that doesn't work, use UNICODE and not UTF.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Fr. Vandecan

tks. strange that at the beginning the file was not containing the ""
Anyway, I'm happy with this now that I understand
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.