Bug 151841 - LO Calc Conditional Formatting Not Saved on Pivot Table When Saving to .xlsx
Summary: LO Calc Conditional Formatting Not Saved on Pivot Table When Saving to .xlsx
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:xlsx, regression
Depends on:
Blocks: Pivot-Table-XLSX XLSX-Conditional-Formatting
  Show dependency treegraph
 
Reported: 2022-10-31 10:59 UTC by dfowler
Modified: 2024-07-23 05:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file with Pivot table and CF applied on it (18.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-05-02 08:58 UTC, Gabor Kelemen (allotropia)
Details
XLSX versions of the example file opened in LO 6.1.0 (151.25 KB, image/png)
2023-05-02 09:01 UTC, Gabor Kelemen (allotropia)
Details
XLSX versions of the example file opened in LO 7.6 master (133.52 KB, image/png)
2023-05-02 09:03 UTC, Gabor Kelemen (allotropia)
Details
XLSX versions of the example file opened in Excel 13 (120.55 KB, image/png)
2023-05-02 09:04 UTC, Gabor Kelemen (allotropia)
Details
The 6.1-saved xlsx version of the example file (7.97 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-02 09:04 UTC, Gabor Kelemen (allotropia)
Details
The 7.6-master saved xlsx version of the example file (10.29 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-05-02 09:05 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dfowler 2022-10-31 10:59:20 UTC
Description:
When I create a pivot table in LO Calc, apply conditional formatting to the pivot table, save it as .xlsc, close the file and then re-open it, the conditional formatting is not retained. 

Steps to Reproduce:
1.Create a pivot table and apply conditional formatting.
2.Save as .xlsx and close file.
3.Reopen file.

Actual Results:
Conditional formatting applied before save is gone.

Expected Results:
Conditional formatting should have been saved. I have been sending this file to others and did not realize the conditional formatting wasn't showing up.


Reproducible: Always


User Profile Reset: No

Additional Info:
That's all.
Comment 1 dfowler 2022-10-31 11:00:03 UTC
* Save as .xlsx, not xlsc.
Comment 2 raal 2022-10-31 19:18:17 UTC
I can confirm with Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: f3a82a8ba51195cf31b0f78164735acc7ebbcd2f
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

works in Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 3 raal 2022-10-31 19:44:48 UTC
This seems to have begun at the below commit.
Adding Cc: to Vasily Melenchuk; Could you possibly take a look at this one?
Thanks
 645daf9a7c0478dee0ff5df5eba3ae78e571a2a6 is the first bad commit
commit 645daf9a7c0478dee0ff5df5eba3ae78e571a2a6
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Nov 29 02:24:41 2018 +0100

    source 6481bda69ade61cb5420156272fcf17edd43d620

https://git.libreoffice.org/core/+/6481bda69ade61cb5420156272fcf17edd43d620
Comment 4 Vasily Melenchuk (CIB) 2022-11-02 15:05:13 UTC
Hm. Looks like an import issue revealed by that mine commit:
* MS Excel does open resulting xlsx file correctly unlike LO
* Even reverting of potentially problematic commit 6481bda69ade61cb5420156272fcf17edd43d620 does not resolve the issue

I'll try to dig xlsx import
Comment 5 Vasily Melenchuk (CIB) 2023-04-28 13:12:19 UTC
raal, are you sure in bibisect results?

My current attempts to repro this problem do show that Calc is not able to candle conditional formatting in pivot tables at all since at least 5.4 (i think since never, but I did not check it).
Comment 6 Gabor Kelemen (allotropia) 2023-05-02 08:58:51 UTC
Created attachment 187042 [details]
Example file with Pivot table and CF applied on it
Comment 7 Gabor Kelemen (allotropia) 2023-05-02 09:01:53 UTC
Created attachment 187043 [details]
XLSX versions of the example file opened in LO 6.1.0

When the example file is saved as xlsx in 6.1 and 7.6, and opened in 6.1 the CF is not visible with the one made by 7.6.
So the roundtrip was indeed good before the bibisected change in 6.3.
Comment 8 Gabor Kelemen (allotropia) 2023-05-02 09:03:09 UTC
Created attachment 187044 [details]
XLSX versions of the example file opened in LO 7.6 master

If the same files are reloaded in current master the CF is not visible in case the 7.6-saved file, but works with the 6.1-made one.
Comment 9 Gabor Kelemen (allotropia) 2023-05-02 09:04:03 UTC
Created attachment 187046 [details]
XLSX versions of the example file opened in Excel 13

Interestingly Excel 13 can read both xlsx files well.
Comment 10 Gabor Kelemen (allotropia) 2023-05-02 09:04:40 UTC
Created attachment 187047 [details]
The 6.1-saved xlsx version of the example file
Comment 11 Gabor Kelemen (allotropia) 2023-05-02 09:05:59 UTC
Created attachment 187048 [details]
The 7.6-master saved xlsx version of the example file

Made with the fresh nightly:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fb3a6b82b55a298eabf8f431f1451dc826642acd
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

I also can confirm the bibisect points to the correct change.
Comment 12 Stéphane Guillou (stragu) 2024-07-22 13:12:10 UTC
Reproduced in recent trunk build:

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8705cfecd5a10f817d3a2a02041d85e77282aa30
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 13 Phil 2024-07-23 05:03:31 UTC
Glad you looked into this grave & long standing bug, was expecting release 24.08 to test it as claimed to be fixed.
https://wiki.documentfoundation.org/ReleaseNotes/24.8

As said in my initial bug report(126557, considered as duplicate of this one), I do suspect, that there is a call to a CONSTRUCTOR(so a fresh formatting) instead of a call to implementing a refresh function(keeps formatting, but refresh VALUES)?