Bug 156449 - Number format: scientific notation do not respect '?' (blank) in exponent
Summary: Number format: scientific notation do not respect '?' (blank) in exponent
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Laurent Balland
Whiteboard: target:24.2.0
Depends on:
Blocks: Number-Format
  Show dependency treegraph
Reported: 2023-07-24 19:01 UTC by Laurent Balland
Modified: 2023-11-01 10:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2023-07-24 19:01:19 UTC
A number format like "0.00E+?0" should display PI() like "3.14E+ 0", as '?' should be replace by a blank if exponent is less than 10. But Calc treats '?' as a '0' and display "3.14E+00".

Steps to Reproduce:
1. In Calc, Format > Cells > Numbers
2. Set Format code to 0.00E+?0
3. Display a value between 1e-9 and 1e10, like PI(), to have only 1 digit in exponent

Actual Results:
Value displayed is 3.14E+00, which corresponds to Format code 0.00E+00

Expected Results:
Value should be displayed as 3.14E+ 0 with a blank instead of the first '0'

Reproducible: Always

User Profile Reset: No

Additional Info:
Excel correctly treats this format code.
Comment 1 Stéphane Guillou (stragu) 2023-07-25 08:15:32 UTC
Reproduced in:

Version: (X86_64) / LibreOffice Community
Build ID: 94caaf5c9e2917a3202cf515d61eaa9399b2c2b5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

And OOo 3.3.
Comment 2 Commit Notification 2023-11-01 10:44:29 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":


tdf#156449 Preserve '0' or '?' in exponent

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.