Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert corrupt csv to fixed width SDF
Message
 
 
To
19/12/2005 19:58:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01079385
Message ID:
01079395
Views:
16
This message has been marked as a message which has helped to the initial question of the thread.
Hi Jim,

I'm not sure why you want fixed length file as result. Would be cleaning up csv file enough? See if Re: Append from Message #1045090 helps.

>We are having problems with a daily import we get from one of our clients that is in a csv file. I decided to attempt converting it to fixed-width, based on the expected number of fields per record, and the structure of that record; see experimental program below. I have a record with 13 fields and each has a specified width in the function "myline" below.
>
>What this program achieves:
>1. Eliminates the problem of extra linefeeds breaking a record in the csv.
>2. Eliminates the problem of extra double quotes within a field breaking the integrity of a record within a row.
>
>Where it fails:
>This program works, but is too inefficient for actual use. It slows down as it gets further into the file.
>

<snip>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform