Bug 155719 - Simple option to reinterpret data as numbers when they have wrong decimal separator
Summary: Simple option to reinterpret data as numbers when they have wrong decimal sep...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-07 15:49 UTC by Yann Salmon
Modified: 2023-06-08 10:53 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Salmon 2023-06-07 15:49:04 UTC
Description:
In locales where the decimal separator is not the dot, it is not infrequent to be confronted with documents where some or all numbers have been written with a dot instead of the traditional separator.

They are thus treated as text by LO. Selecting the cells and changing their locale to English does not cause the data to be reinterpreted as numbers : instead, a single quote is added to the cell content, to force text interpretation.

Steps to Reproduce:
There should be a context-menu option for cells to be interpreted as numbers written with an alternate decimal separator.

Alternatively or in addition, there should be an option in the advanced paste dialog to specify that the data contain numbers with an alternate decimal separator.

Actual Results:
-

Expected Results:
-


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.3
Calc: threaded
Comment 1 Eike Rathke 2023-06-07 17:25:00 UTC
(In reply to Yann Salmon from comment #0)
> In locales where the decimal separator is not the dot, it is not infrequent
> to be confronted with documents where some or all numbers have been written
> with a dot instead of the traditional separator.
> 
> They are thus treated as text by LO.
That's not true. If they were entered as numeric values before then they stay numeric, regardless of the locale they are displayed in. Separators and formats of the current locale are used, unless a fixed locale's attribution was assigned. But cell content does not change to text just because a different locale's separator is used for display.

However, see https://wiki.documentfoundation.org/Faq/Calc/How_to_convert_number_text_to_numeric_data
Comment 2 Yann Salmon 2023-06-08 10:53:13 UTC
Thanks a lot for the explanation -- I will be writing to the people who generate those files wrongly.

The Text to columns trick works by setting the column to English ; however it understandably does not work when multiple columns are selected.