Bug 117808 - cells display numbers as "0%" percent value although the correct percent value is shown in the cell editor
Summary: cells display numbers as "0%" percent value although the correct percent valu...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-25 19:34 UTC by Jérôme
Modified: 2018-07-22 17:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
the files which is saved with the wrong cells formatting (5.96 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-05-25 19:35 UTC, Jérôme
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme 2018-05-25 19:34:28 UTC
Description:
I received a "xlsx" file which was created with the Microsoft Office suite.

I edited it with LibreOffice and saved it again.

The numbers have this strange formatting.

Actual Results:  
The percent displays are always "0%" whatever the value is.

Expected Results:
I would like each number to display with the correct percent formatting.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Comment 1 Jérôme 2018-05-25 19:35:41 UTC
Created attachment 142281 [details]
the files which is saved with the wrong cells formatting
Comment 2 MM 2018-05-25 20:14:01 UTC
Confirmed on windows 7 x64 with Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 3; OS: Windows 6.1; UI render: default;

and

LibreOffice 3.3.4 
OOO330m19 (Build:401)
tag libreoffice-3.3.4.1

In 'format cells' (0%), the format code is set as '0,%' 
If you leave the comma off, making '0%' the cells work again.
Comment 3 m_a_riosv 2018-05-25 21:54:31 UTC
The format code is '0.%', so the dot is dividing the value with 1000 what implies low values are showed as '0%'.

Thousands Separator
Depending on your language setting, you can use a comma, a period or a blank as a thousands separator. You can also use the separator to reduce the size of the number that is displayed by a multiple of 1000 for each separator. The examples below use comma as thousands separator:
Number Format
Format Code
15000 as 15,000
#,###
16000 as 16
#,
Comment 4 Jérôme 2018-05-27 08:00:56 UTC
Ok, that's the wrong format. However, why LibreOffice choose this format when saving this "xlsx" file ?

Maybe I have to specify more what occured :
1. I received a "xlsx" file with percent cells which appeared properly and I open it with LibreOffice 5.2 with french localization over Microsoft Windows 7.
2. I edited the file without any change on the cell format which had percent.
3. LibreOffice saved this modified file with the "xlsx" file format.
4. When I open this file again with LibreOffice, then the cells have a strange appearence.
Comment 5 MM 2018-05-27 10:40:01 UTC
(In reply to m.a.riosv from comment #3)
> The format code is '0.%', so the dot is dividing the value with 1000 what
> implies low values are showed as '0%'.
> 
> Thousands Separator
> Depending on your language setting, you can use a comma, a period or a blank
> as a thousands separator. You can also use the separator to reduce the size

It's set as 'default - english usa'.
The format code which the cells have in this example file is set as '0,%', but the other format codes uses the period instead of the comma. '0.0%' and '0.00%'. These work.
Strangly if you set 100000% (with '0,%'), in the cell it's shown as 100 instead of 100,000.
Comment 6 Buovjaga 2018-06-20 14:00:38 UTC
(In reply to Jérôme from comment #4)
> Ok, that's the wrong format. However, why LibreOffice choose this format
> when saving this "xlsx" file ?
> 
> Maybe I have to specify more what occured :
> 1. I received a "xlsx" file with percent cells which appeared properly and I
> open it with LibreOffice 5.2 with french localization over Microsoft Windows

Do you have the original file, not saved in LibreOffice yet?
Comment 7 Jérôme 2018-07-22 17:23:41 UTC
I couldn't reproduce this bug. I will try to reproduce this bug when I will get a 6 version installed on my Windows 7 host (in a few months).