Processing to cure CSV export issue with quotes question

FilePro List mikefedkiwfp at aol.com
Sat Apr 26 09:53:12 PDT 2014


This is an example of some of the descriptions that cause the problem 
with the quotes that I described in a previous post. There's also some 
code that was submitted as a remedy for the problem I'm having. After 
looking at the code and trying to use it, I'm just lost. I also get a 
syntax error in this line Qq=strtok(a,""")

=============Submitted code to cure issue=====================

If you need the quote, you could add some programming an add \"' to have 
filepro tread the " as a quote.

A(15,*)="Length 12""
Qq=strtok(a,""")    get position of the quote "
Qq should equal 10

Qr=mid(a,"1,qq){""\""{mid(a,qq+"1","15"-qq-+"1")        - NN is the 
length to the end of the field

Qr="Length 12\""

==============My data example=================

MUS 17543 P236E ADJ. COLLAR 1" BLUE 20-26"
MUS 17555 P236E ADJ. COLLAR 1" PINK 20-26"
MUS 18291 P236E ADJ. COLLAR 1" TEAL 20-26"
MUS 18545 P236E ADJ. COLLAR 1" ROSE 20-26"

================my processing==================

a(40,*)=28             'description field is 28
   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

Qq=strtok(a,""")       'get position of the quote "
   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

Qr=mid(a,"1,qq){""\""{mid(a,qq+"1","40"-qq-+"1")
   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

Qr="Length 12\""     <<<<<<<  I am lost here <<<<<<<<
   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -

export word invfile=c:\export\invy.csv
   -   -   -   -   -   -   -   -   -   -   -
xx eq ""
gosub once;xx(1,*,g)="y";goto start
   -   -   -   -   -   -   -   -   -   -   -

invfile(1)=28  <<<<<<<<<  I AM ASSUMING THIS WHERE I WOULD PUT QR 
INSTEAD OF FLD28


Thank you in advance for any help with this issue
Mike


On 4/16/2014 4:19 PM, Richard Kreiss wrote:
>
>> -----Original Message-----
>> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
>> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
>> Behalf Of FilePro List
>> Sent: Tuesday, April 15, 2014 5:07 PM
>> To: 0 Filepro List
>> Subject: Re: CSV Issues with quotes after a number
>>
>> getting rid of the quotes in all of my descriptions is not an option
> If you need the quote, you could add some programming an add \"' to have filepro tread the " as a quote.
>
> A(15,*)="Length 12""
> Qq=strtok(a,""")	get position of the quote "
> Qq should equal 10
>
> Qr=mid(a,"1,qq){""\""{mid(a,qq+"1","15"-qq-+"1")		- NN is the length to the end of the field
>
> Qr="Length 12\""
>
> .
>> That would mess everything up.
>>
>> On 4/15/2014 3:38 PM, Chris Rendall wrote:
>>> I use the xlate command to remove the " from the data before export.
>>>
>>> --- Chris
>>>
>>> -----Original Message-----
>>> From: FilePro List [mailto:mikefedkiwfp at aol.com]
>>> Sent: Tuesday, April 15, 2014 2:28 PM
>>> To: filepro-list at lists.celestial.com
>>> Subject: CSV Issues with quotes after a number
>>>
>>> I am trying to export some information from my inventory file to a CSV file.
>> The info I need to export is item numbers, descriptions, prices, etc. I'm having
>> issues with the description field because some records contain a quote after
>> something like a length like 24".  In those instances, it sucks the next field into
>> the description field cell with a comma placed between them. This only
>> happens if it is a number followed by a quote, letters with quotes after them
>> work out just fine. I even tried changing the edit type on the description fields
>> to see if that made a difference but it didn't. I also was just thinking that I could
>> move the description field to the far right and there wouldn't be anything to
>> suck over but after doing that, it actually sucked up the next line under it.
>>> Any help would be greatly appreciated
>>>



More information about the Filepro-list mailing list