Bug 155719

Summary: Simple option to reinterpret data as numbers when they have wrong decimal separator
Product: LibreOffice Reporter: Yann Salmon <contact>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: enhancement    
Priority: medium    
Version: 7.3.7.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

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.