How to export CSV with embedded commas?

David Groover photographer at thegoldenthread.net
Wed Feb 6 08:43:53 PST 2008


I haven't puzzled this through yet, but I would think there is an  
example in the reference wizard on Replace(.

I don't know how many records you are exporting each time. Assuming  
you have several orders with data that has commas in it then I might  
first identify that actual record separator, possibly a return  
character. If that record separator was also a comma then I would  
replace all instances of that character with a unique name. Then I  
would replace all the commas  with brackets and quotation marks and  
pluses. I imagine it something like this:

lvplaceholder = {, }

//starts with the data:
"We bought apples, bananas, and cherries",
"We bought apples, bananas, and cherries",
"We bought apples, bananas, and cherries"

//Then replaces the separator:
"We bought apples, bananas, and cherries" + lvplaceholder
"We bought apples, bananas, and cherries" + lvplaceholder
"We bought apples, bananas, and cherries"

//Then breaks up the text and commas into a readable and still  
exportable CSV file.
"We bought apples"+{, } + "bananas"+{, } + "and cherries"  +  
lvplaceholder
"We bought apples"+{, } + "bananas"+{, } + "and cherries"  +  
lvplaceholder
"We bought apples"+{, } + "bananas"+{, } + "and cherries"  +  
lvplaceholder

Perhaps it is the import that is the problem and this is still  
missing the point? I wanted to give it a shot though, Hope it helps.

David Groover

On Feb 6, 2008, at 9:15 AM, Steve Tyron wrote:

> Barry, let me clarify. I have used the export wizard with commas as  
> the
> delimiter, but here's what happens:
>
> I have a chunk of information that holds a paragraph of  
> description. If
> the first sentence says, "We bought apples, bananas, and cherries",  
> the
> commas in that sentence become delimiters and apples, bananas, and
> cherries are separated in the exported text.  I thought I had read  
> that
> info within quotes would be somehow held as a unit; that didn't  
> work for
> me. So when I have NO option  other than CSV, and I MUST export a  
> block
> of text with commas used as punctuation, what do I do?
>
> Steve
>
>
>
> Barry Kahn wrote:
>> The text export wizard allows you to select tab or comma as the
>> delimiter. There are fancier ways that I'm just learning to use, but
>> the wizard makes it very easy.
>>
>> bk
>>
>>
>> On Feb 6, 2008, at 10:51 AM, Steve Tyron wrote:
>>
>>> I have never cared for CSV text, preferring tab-sep text instead.  
>>> I must
>>> have missed some detail because I never learned how to export CSV  
>>> text
>>> when some of the information requires a comma? I have tried  
>>> replacing
>>> existing commas with a strange character (œ), then ding a find/ 
>>> replace
>>> after the data is in its new location, but that just seems tedious!
>>>
>>> I have to upload a CSV file to an online shopping cart; I have no  
>>> choice
>>> but CSV. What is my method?
>>>
>>> Thanks,
>>>
>>> Steve
>>>
>>>
>>> _______________________________________________
>>> Qna mailing list
>>> Qna at provue.com <mailto:Qna at provue.com>
>>> http://provue.com/mailman/listinfo/qna
>>
>> Barry Kahn
>> Caravan Beads, Inc.
>> 915 Forest Ave
>> Portland ME 04103
>> 800-230-8941
>> fax: 207-874-2664
>> www.caravanbeads.net
>> barryk at caravanbeads.net <mailto:barryk at caravanbeads.net>
>>
>>
>>
>>
>>
>> --------------------------------------------------------------------- 
>> ---
>>
>> _______________________________________________
>> Qna mailing list
>> Qna at provue.com
>> http://provue.com/mailman/listinfo/qna
>>
>
> _______________________________________________
> Qna mailing list
> Qna at provue.com
> http://provue.com/mailman/listinfo/qna



More information about the Qna mailing list