Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ctrl linefeeds embedded in CSV field
Message
From
19/10/2010 12:27:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Ctrl linefeeds embedded in CSV field
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01486146
Message ID:
01486146
Views:
116
Decided the best way to munge csv files I'm getting Adobe pdf exports is the Fox, but I'm running into problem with memo-type files Adobe is exporting that contain chr(10)+chr(13).

When the csv comes into excel, the field shows as multiple lines. When I try to use that same csv for appending to a VFP dbf, the ctrl linefeed pair is of course seen as the end of the record. I've been massaging the csv using fox's wonder filetostr and strtofile. Problem is i can't figure out how to distinguish between the embedded pairs which I i would like to just replace with "----" or something until I can get them into a VFP memo field and put the linefeeds back and the pairs at the end of a record.

I could live with a technique in Excel that would let me replace the linefeeds in the cells in that column ( I know *nothing* about Excel ) and then export the resulting massaged xls as a csv.

Would welcome any suggestions. There are about 10 columns with this problem and there is no control on the Adobe end of how to export this stuff. ( they are fields in filled out pdf forms where the data type were defined pretty haphazardly by someone who knew nothing about data and was just putting something up for manual entry - but I have a couple thousand records like this with 200 + fields I need to convert to VFP so I can then massage out child data and push data into an existing SQL database )

Oh, secondary question - I forgot - what is the limit on the number of fields in a VFP DBF (assuming in DBC ) ?

TIA


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Next
Reply
Map
View

Click here to load this message in the networking platform