import/export dif
brian at aljex.com
brian at aljex.com
Thu Feb 22 09:29:36 PST 2007
Quoting Jeff Harrison <jeffaharrison at yahoo.com>:
>
> --- "Brian K. White" <brian at aljex.com> wrote:
>
> > We just discovered the hard way today that fp's dif
> > import and export both
> > don't handle quotes properly.
> >
> [snip]
>
> Hi Brian. I hate when that happens. You may want to
> consider using export multi - which I believe excel
> reads very well, or simply use a tab delimited export.
It turns out that the double-double-quote thing is purely a MS excel perversion
of a standard, not fp incompletely implimenting one.
Turns out Excel does this with almost every file format it understands.
I've exported messy data lots of times to several other programs like palm
desktop and various proprietary edi things where I don't even know what they
are using on the other end and never ran into this. This means the file format
itself is good enough that quotes in the data are not ambiguous and there is no
need to escape them the way excel does. I don't think it makes it possible to
put a string that looks like the actual delimiter sequence "," into a field and
treated as data not a field delimiter. Example how should it interpret this
"",""","
Assume that:
O stands for open quote as in the o= of an import/export command
C stands for close quote
F stands for field delimiter
"" is meant to be interpreted as a single " in data, a la excel
And consider any other commas, quotes or characters as payload data
is it "," at the very end of a field?
as in: "","" C F O
ie: "," C F O
is it a single " at the end of an unquoted field (quotes are optional in
csv), followed by a quoted field contains only ", ?
as in: "" F O "", C
ie: " F O ", C
I don't say the basic file format without the double quote scheme is any better,
merely that breaking the standard as excel does does not make a new format that
is any better.
So, filepro, palm desktop, quicken/quickbooks, various other csv-reading apps
all work fine with each other, yet thanks to excel, I can't do what should be a
simple thing. Export a file for excel to read, have the user modify and resave
the file, and import the file back into filepro.
because when excel saves the file, it doubles up the quotes, which breaks fp
trying to read it. And, it's doing the same thing with tab delimited, pipe
delimited, dif, and a few others.
I haven't tested openoffice yet. At first i'd be surprised if the kind of people
who work on open office would tolerate let alone inflict that nonsense, but then
again, they specifically need to be compatible with ms office as much as
possible so like some terminal emulators, they may be "bug for bug compatible".
heh.
Sorry for the slander fp.
bkw
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Filepro-list
mailing list