Bug 157464 - Cells formatted as percentage no longer function as numbers, and cannot even be reverted to numbers
Summary: Cells formatted as percentage no longer function as numbers, and cannot even ...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-27 00:19 UTC by nats.nmr
Modified: 2024-04-27 03:17 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File showing the % formating issue (13.34 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-09-27 11:41 UTC, nats.nmr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nats.nmr 2023-09-27 00:19:30 UTC
If one converts a cell format into % its contents no longer functions as a number, which is a disaster to the data I just input and then reformated.  Example, if one had one row of three cells like:

1.0;  0.5;  0.1;

and one formats them into % they are correctly displayed as:

100%;  50%;  10%;

But now they are no longer numbers, they are strings or something!  One can no longer perform things like: math functions referencing them from other cells, numerical conditional formatting like "Color Scale..." nor can one select them and make a chart.  Worse, one cannot select them and change the cell formatting back to a number to get back the original set of three cells 1.0; 0.5; 0.1 back to do any of the aforementioned operations because those cells are no longer considered numbers at all let alone ones possible to reformat! (really "deformat" as I just want my numbers back!)

Its like the percent reformat option in cell formatting multiplies the number by 100 and then permanently converts it into a string and appends a % onto the back end -- this is terrible behavior as it "de-numbers" your numbers permanently!  The appropriate behavior is similar to treating it like a function with the real unconverted number still there.  I.e., while it shouldn't be displayed to the user in the following way, Calc should think of the cells  1.0;  0.5;  0.1;  when formatted to % as being akin to =Percent(1.0);  =Percent(0.5);  =Percent(0.1), with anything accessing those cells externally (such as: conditional formatting, charts, or equations in other cells) as ignoring the Percent() function and just referencing the input of the function.
Comment 1 m_a_riosv 2023-09-27 00:49:46 UTC
Format doesn't change the values in the cell, only how they are visualizing.
It fine that 1.0 becomes 100% it is what it is, but contained of the keep being 1.

Please attach a sample file where to reproduce the issue.

No issue with
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5e9c8d21874eea8cb5adf2ecab1905295af2308f
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded Jumbo
Comment 2 nats.nmr 2023-09-27 11:41:49 UTC
Created attachment 189847 [details]
File showing the % formating issue

A file showing the issue with formatting as %
Comment 3 nats.nmr 2023-09-27 11:57:10 UTC
(In reply to m.a.riosv from comment #1)
> Format doesn't change the values in the cell, only how they are visualizing.

In playing around now, you seem to be right, but in the attached file in the top left table where I initially experienced this, that still doesn't seem to be the case

The top left table is a copy of the top table on the right, but I selected the data and told format cells to format them as percent.

Now when you click on those cells it shows them as a string starting with a ' and terminated with "%" which means formatting *DID* change those cells.

Also if they are still the same cells, then they are still numbers, so try selecting those ones and do: conditional formatting, make a chart, or even perform a calculation on them from other cells.  You can't, LibreOffice no longer considers them numbers so they can't be treated like numbers any more without retyping them.

Playing with the other tables now it does look like I can convert back and forth for some reason, so you are right, maybe it isn't a bug something just went terribly wrong with that first table.  But that first table in the upper left of the file, when I converted it to % with format cells, it permanently changed those to strings going from say "0.5"  to "'50%"  Why did it do that there but nowhere else?  Is this maybe an issue with the .xlsx format the file is saved in?  I know I didn't type in the ' and change those to strings when I did the formatting on that top left table, I just used the format cells feature.
Comment 4 QA Administrators 2023-09-28 03:18:11 UTC Comment hidden (obsolete)
Comment 5 m_a_riosv 2023-09-28 20:01:45 UTC
I think the issue is that you have formatted those cells with percents as text, and could be mixed with a wrong decimal separator.
If the decimal separator it's fine, try:
Clear the cells format [Ctrl+M]
Select the range,
do a search and replace:
Search for: .+
Replace with: &
Mark regular expression, then replace all.
Comment 6 QA Administrators 2024-03-27 03:14:20 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2024-04-27 03:17:04 UTC
Dear nats.nmr,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp