markgar / ConvertFrom-FixedWidth

Powershell Function to convert fixed with text table to Powershell object list
MIT License
2 stars 1 forks source link

Data with embedded seperators #1

Open nlsdg opened 2 years ago

nlsdg commented 2 years ago

When the data contains the character that is used as a seperator (a comma by default), it adds unwanted extra column(s) in that row, messing up subsequent columns.

Example: if you replace "John Smith" with "Smith, John" in example3.txt, the name column will contain just Smith. The State wille be John, and the telephone number wil be WA.

{ "Name": "Smith", "STATE": "John", "TELEPHONE": "WA" }

DaafSamson commented 11 months ago

I second this! Had the same issue, came up with the identical fix.... Then discovered I wasn't the first ;)