Bug 138993 - Remove commas in numbers
Summary: Remove commas in numbers
Status: CLOSED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-17 11:43 UTC by Jonny Grant
Modified: 2021-01-20 23:02 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
entering numbers with commas (67.01 KB, image/png)
2020-12-18 10:50 UTC, Jonny Grant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonny Grant 2020-12-17 11:43:24 UTC
Hello
Using en_GB Calc I need to manually remove commas when pasting numbers from bank statements. Could Calc handle this automatically?

eg

= 1,947.68 - 1000

Err:509

Calc knows we use the decimal . to separate decimals and comma to indicate thousands. Can Calc understand what is typed? It could simply remove the comma when it accepts the number.

If I paste 1,947.68 directly into a cell, Calc does interpret and remove the comma.
Comment 1 m_a_riosv 2020-12-17 23:08:03 UTC
= 1947.68 - 1000
works for me, I think there is an invisible character, that makes it fails.

To view it, paste it in writer and set up Menu/View formatting marks
Comment 2 Jonny Grant 2020-12-17 23:44:20 UTC
(In reply to m.a.riosv from comment #1)
> = 1947.68 - 1000
> works for me, I think there is an invisible character, that makes it fails.
> 
> To view it, paste it in writer and set up Menu/View formatting marks

Hello
Thank you for checking this.

Could you try wthe comma?

1. Click in a new cell
2. type, or paste this:  = 1,947.68 - 1000
3. See Err:509
Comment 3 m_a_riosv 2020-12-18 00:18:39 UTC
Sorry I copied without the comma, but it works with the comma.

Have you tried to view if there is an invisible character?
Comment 4 Jonny Grant 2020-12-18 10:50:39 UTC
Created attachment 168283 [details]
entering numbers with commas
Comment 5 Jonny Grant 2020-12-18 10:50:52 UTC
(In reply to m.a.riosv from comment #3)
> Sorry I copied without the comma, but it works with the comma.
> 
> Have you tried to view if there is an invisible character?

Many thanks for your reply. I did wonder this, so I removed all the spaces.


=1,947.68-1000

Same issue. What version of Calc are you using? I am on an old release.

I will attach a screenshot.
Comment 6 [REDACTED] 2020-12-18 11:05:17 UTC Comment hidden (obsolete)
Comment 7 [REDACTED] 2020-12-18 11:13:29 UTC Comment hidden (obsolete)
Comment 8 Jonny Grant 2020-12-18 11:26:40 UTC
Many thanks for your investigation. Looks like it's maybe already fixed in newer versions. Sorry to see so many issues with Ubuntu packages.
Comment 9 [REDACTED] 2020-12-18 11:27:44 UTC
Seems to get more complicated:

Repro in (Mint 20, Ubuntu based OS, but using TDF packages) 

Version: 7.0.4.2
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF8); UI: en-US
Calc: threaded
Comment 10 [REDACTED] 2020-12-18 11:35:50 UTC
Changing Function-separator from "," to ";" in Tools -> Options -> LibreOffice ->  Formula -> Section: Separators -> Option: Function" prevents the ERR:509 to occur. Seems to be some conflict (full en_US language environment)
Comment 11 Jonny Grant 2020-12-18 11:36:21 UTC
I also wondered. In countries that don't use the full-stop as decimal place marker - does this work for them? Eg Poland.

As I understand, a Polish user would expect to write in their locale  1.000,00 - 10 

In Japan they use a comma separator at the 4 digit mark.  eg 1,0000.01
Would that be supported?



There's another test case with £ GBP pound symbol

1. =£1000
2. Err:501



Similar example with $ doesn't work, as that's a special character, there's probably no way to use that in the formal box?

1. =$1000
2. #REF!
Comment 12 [REDACTED] 2020-12-18 11:45:37 UTC
ere's another test case with £ GBP pound symbol
> 
> 1. =£1000
> 2. Err:501
> 
> 
> 
> Similar example with $ doesn't work, as that's a special character, there's
> probably no way to use that in the formal box?
> 
> 1. =$1000
> 2. #REF!

Please don't mix issues, though these examples are no issues at all and are to be expected since =£1000 is not a recognized number but text and =$1000 no a valid reference.
Comment 13 [REDACTED] 2020-12-18 12:02:47 UTC
Steps to reproduce (from testing)

- Open a new Calc sheet
- Assure in Tools -> Options -> LibreOffice ->  Formula -> Section: Separators -> Option: Function separator is set to "," (comma), which e.g is default for English (USA)
- Insert: =1,947.68-1000

Actual Result: ERR:509

Expected Result: 947.68
Comment 14 [REDACTED] 2020-12-18 12:06:04 UTC
Now I'm not sure whether this is an enhancement request or it is to be considered a bug based on current supposed/intended functionality.
Comment 15 Eike Rathke 2021-01-19 14:59:13 UTC
This mix within formulas where the group separator equals the parameter separator (or any other operator) won't be supported.
Comment 16 Jonny Grant 2021-01-20 22:30:07 UTC
Good evening, It is a real shame this bug was closed. It does feel like a confirmed issue as it works as normal in Google Sheets, and is easy to reproduce.

Google Sheets doesn't suffer this issue. Sheets also retains the formatting entered correctly. Can you confirm if you can reproduce the same?

Jul-19-2019	
10 Aug 2019

=A1-A2
-22	Days different


We get CSV files from all over the world, USA, Japan, UK, France

In the case of the USA, they often (but not always) put the month before the day, and then end as /19 or /2019 or with hyphen.

There's no reason for us to need to force anything if it can be auto detected

It's a bit strange for us to need to import into Google Sheets, and then export before loading into Calc.

Probably this column forcing on CSV load was only introduced in 7.x which hasn't made it into Ubuntu stable LTS yet. Sorry I am not that up to date.
Comment 17 Eike Rathke 2021-01-20 23:02:11 UTC
(In reply to Jonny Grant from comment #16)
> Jul-19-2019	
> 10 Aug 2019
Comment on wrong bug, you are confusing this with bug 127893.