Bug 32954

Summary: EDITING Pasted space-padded numbers not recognized as numbers
Product: LibreOffice Reporter: Adrian Wilkins <adrian.wilkins+freedesktop>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: major CC: jbfaure
Priority: high    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: example data
screenshot after pasting
screenshot after formatting to Number

Description Adrian Wilkins 2011-01-10 02:48:18 UTC
Paste the following

Class Name                            | Shallow Heap | Retained Heap | Percentage 
---------------------------------------------------------------------------------
com.sleepycat.je.tree.BIN @ 0x9748cbd0|          184 |   187,132,144 |     16.24% 
com.sleepycat.je.tree.BIN @ 0x9adcdb00|          184 |    93,562,784 |      8.12% 
com.sleepycat.je.tree.BIN @ 0x97477810|          184 |    42,450,856 |      3.68% 
com.sleepycat.je.tree.BIN @ 0xb79f64a0|          184 |    25,414,720 |      2.21% 
com.sleepycat.je.tree.BIN @ 0xb60acfb0|          184 |    12,809,176 |      1.11% 
com.sleepycat.je.tree.BIN @ 0xb45bddf0|          184 |     8,607,328 |      0.75% 

Define separator as |

Numbers are pasted as text. Removal of padding spaces causes numbers to be recognized as numbers (format not preserved, but that's trivial).
Comment 1 Kohei Yoshida 2011-01-10 21:05:16 UTC
I've already fixed this.  Please test the next RC to see if this issue has been resolved.  I'll keep this in the meantime.
Comment 2 Florian Reisinger 2012-08-14 13:59:14 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 3 Florian Reisinger 2012-08-14 14:00:26 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 4 Florian Reisinger 2012-08-14 14:05:07 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 5 Florian Reisinger 2012-08-14 14:07:11 UTC
Dear bug submitter!

Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs.

To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement

Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem.

Yours!

Florian
Comment 6 kaesezeh 2012-08-25 00:09:19 UTC
This is still a problem. If I paste this

15.8278481013	2.4169741697
6.301183432	19.1995104039
5.1121212121	23.4404145078
4.3898809524	6.2704691812
3.1075425791	1.5785714286
8.3517835178	6.2253521127
7.2341954023	15.8515228426
4.1090909091	4.6382978723

into Calc, the cells are transformed into text and no calculations can be made with them, etc. Same if a text/csv file with this content is imported into Calc.

Strangely enough, when you just highlight the cells A1:B8 and the go Format Cells > Numbers, then it shows that these cells are of the category Text, which doesn't make sense. However, even when you change their category to Number or All, it doesn't do anything, still no summing.
Comment 7 Florian Reisinger 2012-08-26 15:41:09 UTC
Okay, I am no Calc expert, but: How should I insert this??
Comment 8 kaesezeh 2012-08-27 17:16:49 UTC
Created attachment 66183 [details]
example data
Comment 9 kaesezeh 2012-08-27 17:18:10 UTC
(In reply to comment #7)
> Okay, I am no Calc expert, but: How should I insert this??

Either

- copy those numbers
- go to Calc
- press CTRL-SHIFT-V (for paste special)
- choose tabs and spaces as delimiters and tick "Merge delimiters"
- click OK

  Then you have it in Calc and Pivot Tables can't compute means, the sum thingy in the status bar doesn't show sums, ...

Or

- try to import the attached file into Calc and again Pivot Tables can't compute means, the sum thingy in the status bar doesn't show sums, ...
Comment 10 kaesezeh 2012-08-27 17:38:48 UTC
Actually, on Windoze this works fine, but on Ubuntu it doesn't
Comment 11 Kohei Yoshida 2012-08-27 17:44:32 UTC
This bug report is useless since nobody specifies the version number of his/her tested build.

Please test it in 3.6.1.  Since I can't reproduce it in 3.6.1 I'll close it as WORKSFORME.
Comment 12 Florian Reisinger 2012-08-27 17:50:35 UTC
Thanks for adding information. I now know what is wrong.

For some Programs "," is the comma, for others "."

That means:

ISTEXT

rwgtreg
1b52gr1d5
12.5

ISNUMBER

,5
1
1,2
200,5

So this is no bug, I am very sorry
Comment 13 kaesezeh 2012-09-02 16:07:10 UTC
Created attachment 66497 [details]
screenshot after pasting

With me, it's not the decimal separator thing...

- I am using LibreOffice 3.6.0.2 on Kubuntu 12.04. (It seems to work fine on Win)
- I am using a English US locale where the decimal separator is the period.
- when I copy these three numbers out of this text box:

2.09
2.40
2.12

  and paste them into Calc cells B2:B4 with the following settings

- Separated by tab
- Text delimiter = nothing
- Field/column type: Standard

  then they are pasted in but

- as you can see in the attachment calc1.png , when the field category is changed to Text
- thus, the summing in the status bar upon highlighting does not work
- cell C5, which computes the average of B2:B4 says Div/0.

This is already annoying enough but if I then change the Category to "Number", then

- the numbering stuff still doesn't work but
- the content of the cells B2:B4 is changed: now the numbers are in there with a single quote preceding them, still rendering them text (see attachment calc2.png).

(i) Why can't I just paste numbers into Calc and have them be recognized as numbers or,
(ii) if Calc is dumb enough to treat them as text although I say Field category: General, why can't I at least get them to work as numbers when I format the cells as numbers and not have a stupid quote in there messing things up?
Comment 14 kaesezeh 2012-09-02 16:07:35 UTC
Created attachment 66498 [details]
screenshot after formatting to Number
Comment 15 Jean-Baptiste Faure 2014-05-02 21:16:30 UTC
No problem in current stable versions.
Closing again as WorksForMe.

Best regards. JBF