Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CSV with double quotes
Message
From
10/03/2017 04:49:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01648804
Message ID:
01648894
Views:
51
>>>This gets rid of the dang double quote problem....
>>>
>>>COPY to myfile.csv delimited with "" with character '|'
>>>
>>>...if you do that command it creates a file without those stupid quote marks, delimited with the pipe symbol.
>>>
>>>...Sorry I was late to the game here I didn't notice the thread till just now - but perhaps this can help you out now or in the future. This is one quirk that got me stuck in the past.
>>
>>Victor,
>>I couldn't understand how this would solve the problem. Wouldn't it be a new and more serious problem in itself? If for a second you think it could work, what would happen to a field that contains | ? Or a field with comma, apostrophe, tilde ... in it? Or one with date time data? I would repeat my warning that trying to transfer data to Excel using text is asking for trouble (unless that text is a well known data interchange format, say, XML).
>
>You could pick something besides the | as the delimiter - I guess pick a special character of some kind that doesn't appear in your data. As for the date format I dunno if Excel is smart enough to change that or not. I suppose you could use OLE automation with Excel and change it somehow if it doesn't do it for you on import.

For a CSV you could only pick a comma and removing quotes you risk the comma inside the quotes. For a CSV to use with Excel, the only correct way to is to double the double quotes. But again CSV is not a good choice for data transfer.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform