Bug 166557 - calc changes semicolons in a formula to commas. Formula then stops working
Summary: calc changes semicolons in a formula to commas. Formula then stops working
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-13 02:31 UTC by Duncan Roe
Modified: 2025-05-14 11:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Roe 2025-05-13 02:31:57 UTC
Description:
I wanted to display a cell as blank and found <https://ask.libreoffice.org/t/how-to-return-empty-cell-from-function-in-calc/8435/5>.
So I used the formula =IF(A1=0;{};A1). This worked fine when I entered it in the text bar and clicked the green tick-mark. A1 was 1 and B1 displayed 1. Change A1 to 0 - B1 display stays unchanged (??).
Click on B1 - goes blank, change A1 back to 1, click on B1 *stays blank*. Looking at the text bar I see the formula displayed with semicolons changed to commas.
LibreOffice Online Help says to use semicolons in formulas but the tool tip says to use commas
The formula with commas always makes the cell blank, regardless of the tested value.
Calc should either make commas work in formaulas or leave semicolons alone.

Steps to Reproduce:
1.Enter 1 in A1 and =IF(A1=0;{};A1) in B1
2.Enter 0 in A1. Observe B1 does not change
3.Click on B1. Observe it goes blank. Observe formula in text bar now has commas where it had semicolons.
4.Enter 1 in A1. Observe B1 unchanged.
5.Click on B1. Observe it stays blank
6. Change commas back to semicolons in text bar
7. Click green tick. Observe B1 displays 1

Actual Results:
As above

Expected Results:
Changing A1 to 0 should make B1 go blank straight away and changing A1 back to 1 should make B1 display 1


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build: https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h=bbb074479178df812d175f709636b368952c2ce3
Environment: CPU threads 16; OS: Linux 6.13
User Interface: UI render: default; VCL: gtk3
Locale: en-GB (en_US.UTF-8); UI: en-US
Misc: Calc: threaded
I had to transcribe the above by hand except the URL
Comment 1 m_a_riosv 2025-05-13 06:28:57 UTC
If I'm not wrong, you are using an supposed inline blank array, that is not allowed.
=IF(A1=0;"";A1)
works as expected.

There is no option to generate a blank cell with a formula, at most you can generate a cell with an empty string, but it is not a blank cell.
Comment 2 Duncan Roe 2025-05-14 11:18:53 UTC
Many thanks for that info. I posted it in <https://ask.libreoffice.org/t/how-to-return-empty-cell-from-function-in-calc/8435/25>.