CSV import trouble (numbers & locale)

classic Classic list List threaded Threaded
6 messages Options
Andrea Venturoli Andrea Venturoli
Reply | Threaded
Open this post in threaded view
|

CSV import trouble (numbers & locale)

Hello.

I'm producing a CSV for a customer of mine, which will import it with
LibreOffice 6.2 on a Mac.

If LibreOffice locale (from Options menu item) is set to English,
everything is fine; if it's set to Italian there are problems with numbers:
_ 123.45 gets correctly read as 123,45 (we use comma for decimals in
Italian);
_ 123.456 is read as 123456, when it should be 123,456.

So my customer has to switch global locale, import the file and switch
back (not sure if she also needs to restart LO).



What puzzles me is that she's also asked the locale in the import
dialog, but what she chooses here doesn't seem to matter.

Is this a bug or am I overlooking something?



  bye & Thanks
        av.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Italo Vignoli-4 Italo Vignoli-4
Reply | Threaded
Open this post in threaded view
|

Re: CSV import trouble (numbers & locale)

IMHO the issue could be related to the cell format, either to the number
of decimals or to the thousands separator. In any case, the cell format
can be tweaked.

On 23/04/19 17:06, Andrea Venturoli wrote:

> Hello.
>
> I'm producing a CSV for a customer of mine, which will import it with
> LibreOffice 6.2 on a Mac.
>
> If LibreOffice locale (from Options menu item) is set to English,
> everything is fine; if it's set to Italian there are problems with numbers:
> _ 123.45 gets correctly read as 123,45 (we use comma for decimals in
> Italian);
> _ 123.456 is read as 123456, when it should be 123,456.
>
> So my customer has to switch global locale, import the file and switch
> back (not sure if she also needs to restart LO).
>
>
>
> What puzzles me is that she's also asked the locale in the import
> dialog, but what she chooses here doesn't seem to matter.
>
> Is this a bug or am I overlooking something?
>
>
>
>  bye & Thanks
>     av.
>

--
Italo Vignoli - [hidden email]
mobile/signal +39.348.5653829 - skype italovignoli
hangout/jabber [hidden email]
GPG Key ID - 0xAAB8D5C0
DB75 1534 3FD0 EA5F 56B5 FDA6 DE82 934C AAB8 D5C0

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Andrea Venturoli Andrea Venturoli
Reply | Threaded
Open this post in threaded view
|

Re: CSV import trouble (numbers & locale)

On 4/23/19 10:39 PM, Italo Vignoli wrote:
> IMHO the issue could be related to the cell format, either to the number
> of decimals or to the thousands separator. In any case, the cell format
> can be tweaked.

Thanks for your answer.
However I'm not sure what you mean here:

_ tweaking on the CSV side? Sure I can, but I'd rather not: the file has
other uses, besides being importe in LibreOffice; also it's already
correct (for some definition of correct, i.e. English locale);

_ tweaking during import? I don't see any option to choose decimal
separator; only locale setting, which, as I said, does not work.

_ settings decimal separator globally? This is not what my customer
wants: she wants to work with Italian locale, but be able to import this
single file with dot as decimal separator; the option seems to be there,
just not working.

_ Something else? What?




What I'm trying to understand is whether the fact that setting locale in
the import dialog has no effect is a bug (which I should report) or if
I'm just trying something that will never work conveniently and I'll
need to think about a different workflow.

  bye & Thanks
        av.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
drew-gmail drew-gmail
Reply | Threaded
Open this post in threaded view
|

Re: CSV import trouble (numbers & locale)

Howdy,

Well, I'm using LibreOffice 6.2.3 (with Ubuntu) and have created a csv file
with two data rows
12.12
12.123

Then set my global locale to Italian(Italy) and try to open the csv file.
(which is using a tab to separate values btw)
If in the dialog box I change the defaulted Italian(Italy) locale to
English(USA) everything works as expected, with the data in the now
Italian(Italy) local file:
12,12
12,123

If I do not set the locale in the import dialog to a locale which used the
'.' for decimal it does not work properly.

But if doing it in that order does is not working on the MAC then I would
say yes you should open an issue in the bug tracker.

Best wishes,

drew



On Tue, Apr 23, 2019 at 11:08 PM Andrea Venturoli <[hidden email]> wrote:

> On 4/23/19 10:39 PM, Italo Vignoli wrote:
> > IMHO the issue could be related to the cell format, either to the number
> > of decimals or to the thousands separator. In any case, the cell format
> > can be tweaked.
>
> Thanks for your answer.
> However I'm not sure what you mean here:
>
> _ tweaking on the CSV side? Sure I can, but I'd rather not: the file has
> other uses, besides being importe in LibreOffice; also it's already
> correct (for some definition of correct, i.e. English locale);
>
> _ tweaking during import? I don't see any option to choose decimal
> separator; only locale setting, which, as I said, does not work.
>
> _ settings decimal separator globally? This is not what my customer
> wants: she wants to work with Italian locale, but be able to import this
> single file with dot as decimal separator; the option seems to be there,
> just not working.
>
> _ Something else? What?
>
>
>
>
> What I'm trying to understand is whether the fact that setting locale in
> the import dialog has no effect is a bug (which I should report) or if
> I'm just trying something that will never work conveniently and I'll
> need to think about a different workflow.
>
>   bye & Thanks
>         av.
>
> --
> To unsubscribe e-mail to: [hidden email]
> Problems?
> https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
> List archive: https://listarchives.libreoffice.org/global/users/
> Privacy Policy: https://www.documentfoundation.org/privacy
>

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Luuk Luuk
Reply | Threaded
Open this post in threaded view
|

Re: CSV import trouble (numbers & locale)


On 24-4-2019 05:43, Drew Jensen wrote:

> Howdy,
>
> Well, I'm using LibreOffice 6.2.3 (with Ubuntu) and have created a csv file
> with two data rows
> 12.12
> 12.123
>
> Then set my global locale to Italian(Italy) and try to open the csv file.
> (which is using a tab to separate values btw)
> If in the dialog box I change the defaulted Italian(Italy) locale to
> English(USA) everything works as expected, with the data in the now
> Italian(Italy) local file:
> 12,12
> 12,123
>
> If I do not set the locale in the import dialog to a locale which used the
> '.' for decimal it does not work properly.
>
> But if doing it in that order does is not working on the MAC then I would
> say yes you should open an issue in the bug tracker.
>
> Best wishes,
>
> drew
>
>
After opening a CSV file, The 'column type' can be set (see atached
picture.)

The data in the columns (12.12 and 12.123) is imported using the decimal
separator of the language of you locale, in my case 'Dutch' (=decimal ",")

test.csv

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Windows10 / LibreOffice  (latest?)
Andrea Venturoli Andrea Venturoli
Reply | Threaded
Open this post in threaded view
|

Re: CSV import trouble (numbers & locale) [Solved]

In reply to this post by drew-gmail
On 2019-04-24 05:43, Drew Jensen wrote:

> But if doing it in that order does is not working on the MAC then I
> would say yes you should open an issue in the bug tracker.

I'm writing just to report the status, after some test:

_ on a Mac with 6.2.0 I had no problem;
_ on another Mac with 6.2.1 I had the problem I described;
_ after upgading the latter to 6.2.3, everything is working fine.

  bye & Thanks
        av.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy