Differences in export function results
GCC Consulting
gccconsulting at comcast.net
Fri May 15 07:20:24 PDT 2009
> -----Original Message-----
> From: filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com
>
[mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.celestial.com]
On
> Behalf Of Kenneth Brody
> Sent: Thursday, May 14, 2009 11:18 PM
> To: rkreiss at gccconsulting.net
> Cc: filepro-list at lists.celestial.com
> Subject: Re: Differences in export function results
>
> 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?
Export without the quote gives a date-month(3 letters) in that column
location and the actual value in the next column position.
When quoted and a value present the value is properly imported into Excel
and all other values are in the correct location.
As I indicated below, I needed to test for a blank. If blank export a null
value with no quotes.
> > 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?
Didn't expect the same results. I wanted to see which function would give
the desired results. Export word worked fine once I tested for an blanks
and made sure I didn't export the double quotes.
> The line:
> export word shipdet=c:\shipdet
> is equivalent to:
> export ascii shipdet=c:\shipdet r=\n f=, o=" c="
More information about the Filepro-list
mailing list