Re: Imported text is converted to date



    I just discovered that the same problem occurs with other data types.
Inexplicably, "10.2.4, 4" is imported as type General and treated as text,
but "10.2.4" is usually (but not always!) converted to a date, depending on
locale.  "$4" is converted to currency, but "$4+$6" is type General and
treated as text.  "237" is converted to a number, etc.  So the syntax is not
only irregular, but the results are unpredictable.  Why not just import all
of these as text?

Because lots of people do not want that.  People expect $4 to become
an amount that can be used in calculations.  Other people have dates
in their csv files.  Some want "1e1" to be a number; for others it is a text.

It's a giant mess with no way out -- other than not using csv.

I can't think of any reason why non-text data should ever be enclosed in
quotes.

Every person has at least one opinion on the details of csv files.  "Quotes
should always mean text" is one such.  In practice you will find many files
where everything or almost everything is quoted.  That quoting means
nothing.

And some numbers *have* to be quoted, namely those that contain a comma
as the decimal separator in a file where commas are also used to separate
the fields.

If I filed a bug report, do you think there is a chance that it would
ever get fixed?

No.  It's basically one man's wish against another man's.  And I am caught
in the middle.

Morten


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]