GNOME Bugzilla – Bug 136729
CSV import puts all columns into one cell
Last modified: 2004-12-22 21:47:04 UTC
When opening a CSV (comma separated values) file as CSV file, all values in one line end up as comma-separated data in one cell. This is not how things should be. Version of gnumeric is gnumeric2-1.1.20-36.
Created attachment 25441 [details] CSV file being used (Created by OpenOffice AFAIK)
I will have to try it out later, but I suspect that in locale de the default field separator is semicolon rather than comma since comma is the `decimal point'. So if you want to use comma as in the given file you should use the configurable text import. Since ther is no data loss and you can open the file using `configurable text import' I am changing the severity to normal.
I can replicate this under the de_DE locale. I am not sure though whether gnumeric's behavious is wrong or the translation of comma-separated-values ought to be Semikolon-...
This has the feel of a damned-if-you-do and damned-if-you-don't bug.
Regarding locale settings: LC_COLLATE=POSIX LANG=de_DE@euro Despite of those settings I think that CSV should, as the name suggests, always use comma as a separator, regardless of what some locale suggests. The "configurable text import" should be the fany version if required.
Any reasonable translation of csv has to retain `comma' since the language is technically independent from the decimal point character. So I would agree with Ulrich...
I think I've found the source of confusion: MS-Excel/2000 actually uses a semicolon (at least in the Germanized version) to separate values when saving as "CSV", while OpenOffice seems to use a comma actually. The other difference I've seen is that OpenOffice puts double-quotes around string values, while MS-Excel does not.
May I assume that OOo uses a period as a decimal seperator for CSV export no matter what the locale ?
that would make to much sense. The following is in OO 1.1: I exported a file with OO default settings for csv and get: 0,8,"hello","World!!" 0,511111111111111,, where the first entry in each record is supposed to be a decmal number!
I tested it at home: OpenOffice 1.1 uses a comma to separate values. StarOffice 5.2 uses a TAB to separate values. Both Programs call the format "CSV". Both programs were using German locale and were using German translations (just in case that matters).
Just to emphaisze it: Openoffice's handling in locale de is broken: it uses comma to separate fields but it does not escape the commas used as decimal points, so as soon as you have one decimal number on import it is impossible to decide whether a given comma is a field separator or a deciaml point. In gnumeric if you force comma to be the separator (via configurable export) the decimal numbers are being quoted so it is clear which commas are field separators. I suggest we leave it as it is.
Well, we seem to be doing the same thing as MS-Excel/2000. Open Office handling of csv export in locale de is broken. So I see no reason why we should change anything.