Apache OpenOffice (AOO) Bugzilla – Issue 18605
Inputting decimal numbers with Latvian (Latvia) keyboars in OpenOffice calc
Last modified: 2003-12-22 05:23:52 UTC
I have a problem when I importing *.txt file in New SpreadSheet. The sample of *.txt file: Lîmlenta * 3.000 0.000 0.000 0.000 0.000 3.000 Blîvgumija balta 50.000 0.000 0.000 0.000 0.000 50.000 Nosegplâksne 26.000 0.000 0.000 0.000 0.000 26.000 Nosegplâksne * 2.000 0.000 0.000 0.000 0.000 2.000 Nosegplâksne 25.000 0.000 0.000 0.000 0.000 25.000 Problem is this decimal delimiter in decimal numbers. Calc can`t recognize this numbers as decimal numbers. And input from numeric pad on keyboard have the same problem whitch are writen in Issue#: 1820
Hi, I can't reproduce this. If I try to open a file with your values, they are imported as numbers with the default numberformat which has no decimal places. If you need 4 decimals, just change the numberformat. if you want to import a number with a dot as decimal separator into a locale which has a comma as such, just set the column type to US-English. Therefore I have to close this as invalid. The problem with the numpad decimal separator is handled via Issue 1820. Frank
closed invalid
Created attachment 8737 [details] Sample text file to import.
Hi, your priority was much to high. Prio 1 means the whole application is crashing. This is not the case, so I adjusted this. The prblem seems to be the thousands separator. What is the default one for Latvia ? A space ? Frank
Problem is in decimal delimiter. In Latvia we need "." With thousands seperator all is OK. Default in Latvia is space.
Hi, No, the problem is definitly in the thousands and not in the decimal separator. Space as thousands separator is not recognized. Dot as decimal sepearator is recognized if US-English is selected as column type. Frank Hi Eike, please have a look. Windows XP states the space as thousands separator for latvia as well. Frank
The issue is the group (AKA thousands) separator as defined in i18n locale data, it should be the space character instead. Needs redefinition of number format codes as well.
OK but how to correct problem with this IMPORT to CALC? Sample of TXT file are posted there. May be somebody can tell step by step how to do this, if you say that there no problems......?
Hi, for now the only way to workaround this is to eliminate the thousands separator ( the spaces in this case) with an editor. Sorry for no better reply. Best regards Frank
Ok I write simple PHP script whitch delete all spaces(thousand seperators), but I have problems Width decimal simbol whitch are ".", but I need "," calc can`t understand "."
Hi, if you set the column type to US English (in the csv Import dialog) the numbers will get in. Try it. I will attach a gif showing the dialog with set column type. Frank
Created attachment 8969 [details] CSV dialog, column type set to US-English
Created attachment 8971 [details] sample
Created attachment 8972 [details] sample
I post Two attachments. In second you can see my problem. Column type is US-English (first attachment).
Hang on, I previously mixed up Lithuanian and Latvian locale data. So the real (and correct) settings available for Latvian are: ThousandSeparator: > < (blank|space) DecimalSeparator: >,< (comma) These are identical to the Windows Regional Settings. So if your system is set up to use the Latvian locale everything should be fine. The problem is the data to be imported, it uses space as thousand separator and dot as decimal separator. Of course this mixture doesn't match neither Latvian nor English-US locale, so import fails anyways. There's nothing Calc could do about it, it's a problem of the program that exported the data.
close invalid
Removing target from invalid Issue, to reduce the statistics.