I try to select a few rows from a csv file and export it into a new file. Everything is fine so far, but I like to have the result without quotation marks. (I know quotation marks are standard in csv) Any suggetions?
Import-csv D:\Daten\csv_test1.csv -Delimiter “;” | select ID, Name, vorname | Export-Csv -Path D:\Daten\New.csv -NoTypeInformation
You can use Powershell version 7.x. There the cmdlet Export-Csv has some options to control the use of quotation marks. If that’s not an option for you you will have to do it yourself.
Import-csv D:\Daten\csv_test1.csv -Delimiter “;” | select ID, Name, vorname | Export-Csv -Path D:\Daten\New.csv -NoTypeInformation -UseQuotes never
so simple, thanks to PS 7 and Olaf
love it. Thank you very much;-)
Great. I’m glad I could help.
For the next time … when you post code, error messages, sample data or console output format it as code, please.
Here you can read how that works: Guide to Posting Code.
Thanks in advance