Quantcast
Channel: Replace "Line Feed" in columns with "" in csv file - Powershell - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Replace "Line Feed" in columns with "" in csv file - Powershell

$
0
0

I have got a situations where I receive csv file from third party and one of the column contains the line feeds in it. Thus causing issues with the uploading of csv file to database.

I am using SSIS package to parse csv file. Now I want to correct the csv file before it get's used by SSIS.

I'll prefer a powershell script for that.

this question handling a CSV with line feed characters in a column in powershellis very related to what I am looking with one difference..

My data is in this format (Notice [LF] in the end instead of [CR][LF]

Column1,Column2,Column3,Column4Text1,"Text2[LF]","text3[LF]",text4[LF]

Edit

Data Example

Column1, Column2, Column 3[LF]1, "text text", text[LF]2, "text[LF]Some more text [LF]Some more text", text[LF]3, "text again", text[LF]

Here's the actual file https://www.dropbox.com/s/wsxfyehlnls7m53/test.csv

Can this actually be corrected, or it's just impossible?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images