Bug 122096 - FILEOPEN XLSX Conditional formatting with cell contains condition is imported with quotation marks
Summary: FILEOPEN XLSX Conditional formatting with cell contains condition is imported...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Conditional-Formatting
  Show dependency treegraph
 
Reported: 2018-12-14 11:51 UTC by NISZ LibreOffice Team
Modified: 2023-08-27 00:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
The original document. (17.13 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-12-14 11:52 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Excel and Calc. (411.01 KB, image/png)
2018-12-14 11:52 UTC, NISZ LibreOffice Team
Details
The example file in Excel 13 and LO7.2 nightly (107.54 KB, image/png)
2020-12-18 08:46 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2018-12-14 11:51:31 UTC
Description:
When you make a conditional formatting with cell contains a number with a “,” symbol (eg.: 1,23) it doesn’t work when opened in LO.

Steps to Reproduce:
    1. Create a new xlsx in LO.
    2. Create a new rule in conditional formatting.
    3. Set its condition to contains given text and set the text to 1,23
    4. Write some numbers to the area some of which contain the number and notice that the formatting works.
    5. Save the file and open it in LO.
    6. Notice the differences then write into one of the are this: “1,23” with the “ symbols.

Actual Results:
In LO the formatting only works when “1,23” is in the cell.

Expected Results:
It should work as it does in MSO so with both 1,23 and “1,23”.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2018-12-14 11:52:22 UTC
Created attachment 147527 [details]
The original document.
Comment 2 NISZ LibreOffice Team 2018-12-14 11:52:42 UTC
Created attachment 147528 [details]
Screenshot of the original document side by side in Excel and Calc.
Comment 3 Roman Kuznetsov 2018-12-15 08:04:12 UTC
confirm in

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

in Excel condition is "Text contains 1,23". Do you see? TEXT. There isn't the same condition in Calc
Comment 4 Xisco Faulí 2018-12-18 13:50:40 UTC
Also reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default; 

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 5 QA Administrators 2020-12-18 03:50:58 UTC Comment hidden (obsolete)
Comment 6 NISZ LibreOffice Team 2020-12-18 08:46:19 UTC
Created attachment 168281 [details]
The example file in Excel 13 and LO7.2 nightly

Still a problem in:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: e97a81e94511b52987a50b7bdb72c922899da588
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

To clarify this example file was made in Excel 2010.
Comment 7 NISZ LibreOffice Team 2020-12-18 08:53:38 UTC
@Tibor maybe one more for you? This imports the condition as "1,23" but it really should just use 1,23 to get the same effect (for the number type cells at least).
Comment 8 QA Administrators 2022-12-19 03:18:24 UTC Comment hidden (obsolete)
Comment 9 Michaela 2023-08-26 20:40:27 UTC
Still repro with:
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e46e663cc350d89e4997095466d675b875eb2e04
CPU threads: 12; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Comment 10 ady 2023-08-27 00:07:38 UTC
As of a recent LO Dev 24.2, IMHO the "Contains" conditional format is not working as expected, whether it is imported from xlsx, or in a new (ods) file.

IMHO, the "Contains" type of condition should not require to use quotation marks in order to return TRUE for the condition on non-numeric values. (However, I am not sure whether changing this might have compatibility problems with older versions.)

A condition such as 'Contains 1' should be evaluated independently of whether the value in the cell is text or number. If users want to restrict this to a specific type of value (e.g. either numeric values only, or text values only), they should add an additional condition.

Currently, we have a somewhat-confusing situation. For example, starting from attachment 147527 [details] (from comment 1), if the condition is modified (menu Format > Conditional > Manage > Edit) from:

'Contains "1,23"'

to:

'Contains 1,23' (without the quotation marks around the value)

it results in all empty cells being TRUE for the condition; this result is not intuitive, or even not understandable/logical at all (at least for users).