LOCalc - not recognizing English month names in CSV import
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
LOCalc - not recognizing English month names in CSV import
I am opening a CSV file. In the import CSV dialog I mark the date column and tell Calc it is a date in DMY format.
Using LibreOffice 4.3.3 on Debian Jessie.
After importing this is displayed:
"23 Jul 2018" -> 7/23/2018
"23 Mar 2018" -> 23 Mar 2018
So the first line containing Jul is converted to a date, while the line containing Mar remains text.
Actually, the lines with the month names Jan, Feb, Apr, Jun, Jul, Aug, Sep, Nov and Dec are converted correctly to dates. Line containing Mar, May and Oct are not.
When I edit the CSV file and replace those with the Dutch names Maart, Mei and Okt the conversion is correct. The other abbreviations are equal in Dutch and English.
Now I live in the Dutch Kingdom, but my computer doesn't know it. Debian is US, all applications are US, locale is en_US. My CSV file is English. Time is set to UTC. I did not load any additional language modules for spell check or so.
In Calc I have set the language settings:
User Interface: Default - English (USA)
Locale setting: Default - English (USA)
Enhanced language support: Ingnore system input language.
Now why is it that LOCalc insists of using Dutch month names while converting a CSV file?
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Original Poster
Rep:
It must be something like that. Highly annoying. I am afraid this is the future with all that highly praised Artificial Intelligence. I hate it. I clearly told Calc that everything should be US or en_US and still it knows better. Based on some mysterious information.
See, I am in the Dutch kingdom, but not in the Netherlands and not in EU. It means that the language is not Dutch, the currency is not Euro but $. The decimal separator is '.' And the date format is M/D/Y or D/M/Y, depending on who you are talking to. (Now that is highly annoying as well, so I use ISO date format)
When I was trying various import options in Calc, I noticed that numbers were not imported correctly either. Numbers containing a decimal point were considered text. Only numbers with a decimal comma are considered numbers.
The weird thing is that when I enter something in Calc, the decimal separator must be '.', not ',' and month names must be English. It is only when importing CSV the Dutch locale settings are used. I can't think of anything more stupid.
Anyway, thanks to the extremely helpfulness and user friendlyness of Calc I now run all import files through a sed script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.