Differences in export function results
Kenneth Brody
kenbrody at spamcop.net
Thu May 14 20:17:52 PDT 2009
Richard Kreiss wrote:
> Ran into an interesting problem the other day at a client's site. There is
> an export program which creates a csv file which had been running correctly,
> that is until Tuesday.
>
> Some of the data was being pushed right on position.
What, exactly, is in the CSV file at the point where the data is "shifted"?
> The export command used was export word.
What is the complete export line?
> Now there is a gotcha in this export. There is an alphanumeric field which
> has numbers 4 - 8 meaning a 4 foot section of shelf was changed to 8 foot.
By that, do you mean the field contains the text "4 - 8"?
> The only way to get this out so that when it is read into Excel is to
> "\""{40. This exports the value correctly. Otherwise it treated this like a
> date.
It sounds more like this allows Excel to import it "correctly", since it is
Excel that treats it as a date otherwise.
Why are you prefacing one field with an open quote, and not supplying a
close quote? Perhaps that's the problem right there?
> I tried to correct the right shift by using export ASCII to no avail. This
> made the situation worse.
What was your actual export ASCII line?
> I finally realized what was causing the shift. If there was no value in
> field 40, double quotes were exports and pushed values over to the right.
What, exactly, ends up in the export file?
> When the export word was set to:
>
> If: 40 = ""
> Then:com(23)="";GOTO exp24
> If: 40 ne ""
> Then:com(23)="\""{40
>
> This worked fine.
>
> There are definite differences between the 2 functions.
>
> export ascii shipdet =c:\shipdet r=\n f=, -x
>
> export word shipdet=c:\shipdet
>
> May not give the same results.
Why would you expect them to give the same results, when they're not equivalent?
The line:
export word shipdet=c:\shipdet
is equivalent to:
export ascii shipdet=c:\shipdet r=\n f=, o=" c="
--
Kenneth Brody
More information about the Filepro-list
mailing list