Bug 109016 - FILESAVE XLSX PIVOTTABLE: Filter set on row fields not saved
Summary: FILESAVE XLSX PIVOTTABLE: Filter set on row fields not saved
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords: filter:xlsx
Depends on: 89139
Blocks: Pivot-Table-XLSX
  Show dependency treegraph
 
Reported: 2017-07-08 08:06 UTC by Gabor Kelemen
Modified: 2017-11-09 09:20 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document with row field filter set (13.45 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-07-08 08:06 UTC, Gabor Kelemen
Details
The same file saved as XLSX (12.33 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-07-08 08:08 UTC, Gabor Kelemen
Details
Screenshot of the problem with the ods file opened on the right, xlsx on the left (75.85 KB, image/png)
2017-07-08 08:11 UTC, Gabor Kelemen
Details
Same document saved from Excel 2013 for comparison (18.28 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-07-08 08:13 UTC, Gabor Kelemen
Details
Simple document which shows the issue (12.16 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-08-01 06:22 UTC, Bartosz
Details
Example of .xlsx file with containsSemiMixedTypes field usage (79.46 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-08-01 07:02 UTC, Bartosz
Details
Same document saved as XLSX by LibreOffice 6.0 (9.30 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-09-15 03:30 UTC, Bartosz
Details
Screenshot of the document in Excel 2013 (106.75 KB, image/jpeg)
2017-09-18 08:29 UTC, Gabor Kelemen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2017-07-08 08:06:56 UTC
Created attachment 134539 [details]
Sample document with row field filter set

Attached ods file contains a row field filter in cell A3, set to hide the (empty) values.

When saved to XLSX in a current 6.0 master build this filter setting is lost and all three row fields are shown.
Comment 1 Gabor Kelemen 2017-07-08 08:08:18 UTC
Created attachment 134540 [details]
The same file saved as XLSX
Comment 2 Gabor Kelemen 2017-07-08 08:11:01 UTC
Created attachment 134541 [details]
Screenshot of the problem with the ods file opened on the right, xlsx on the left
Comment 3 Gabor Kelemen 2017-07-08 08:13:38 UTC
Created attachment 134542 [details]
Same document saved from Excel 2013 for comparison

If the same content is saved from Excel then reading the row fields filter is no problem.
Comment 4 m.a.riosv 2017-07-08 11:04:26 UTC
Repro
Version: 6.0.0.0.alpha0+
Build ID: 054dab1b9d4985c473e07c2618e5d6bf6ebc5466
CPU threads: 4; OS: Windows 6.19; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-07-05_06:06:48
Locale: es-ES (es_ES); Calc: group

With bug#89139 was solved save the pt on xlsx format.
Comment 5 Bartosz 2017-07-11 05:06:25 UTC
Also reproducible with LibreOffice 5.3.2.2 on MacOS.
The issue is inside:
 /xl/pivotCache/pivotCacheDefinition1.xml part (PivotTable cache)
Comment 6 Bartosz 2017-08-01 06:22:39 UTC
Created attachment 135035 [details]
Simple document which shows the issue
Comment 7 Bartosz 2017-08-01 07:02:26 UTC
Created attachment 135036 [details]
Example of .xlsx file with containsSemiMixedTypes field usage
Comment 8 Bartosz 2017-09-15 03:30:07 UTC
Created attachment 136254 [details]
Same document saved as XLSX by LibreOffice 6.0

Thanks to fixes from tdf#89139, the filter is working correctly (there is no empty field).
Also there is no error during import by MS Excel 2013
Comment 9 Gabor Kelemen 2017-09-18 08:29:27 UTC
Created attachment 136335 [details]
Screenshot of the document in Excel 2013

Indeed the filtering of your example looks fixed, thanks.

However, it looks like the pivot table itself is completely gone. 
Is that a known regression?
Comment 10 m.a.riosv 2017-09-18 09:51:59 UTC
Maybe this one https://bugs.documentfoundation.org/show_bug.cgi?id=89139
Comment 11 Tamás Zolnai 2017-10-04 17:30:10 UTC
Hi Gabor,

Some new pivot table related fixes were pushed to master branch. This document seems good now for me. Can you check whether you still experience this issue. Otherwise would be good to close this bug.
Comment 12 Gabor Kelemen 2017-10-05 21:08:12 UTC
Hi Tamas

I can confirm that on a build with commit 5c977ea903b26471877eecaad63766f5e70fd0b2 from yesterday the exported XLSX looks and works okay, the original problem is gone.

Resaving the XLSX file however results in a seemingly endless loop - do you see something similar? Maybe it's just me, I'm not sure.
Comment 13 Xisco Faulí 2017-10-05 21:24:59 UTC
mmm I can still reproduce the issue in

Version: 6.0.0.0.alpha0+
Build ID: 7901ede8a63f41aea707bd19c22f834253161378
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

are you on Win ?
Comment 14 Gabor Kelemen 2017-10-06 08:37:10 UTC
(In reply to Xisco Faulí from comment #13)
> mmm I can still reproduce the issue in
> 
> Version: 6.0.0.0.alpha0+
> Build ID: 7901ede8a63f41aea707bd19c22f834253161378
> CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
> Locale: ca-ES (ca_ES.UTF-8); Calc: group
> 
> are you on Win ?

No, I use Ubuntu 14.04.
But we can recheck under Win from a fresh build.
Comment 15 Xisco Faulí 2017-10-07 08:33:14 UTC
Ok, I've just retested and it seems OK in

Version: 6.0.0.0.alpha0+
Build ID: ad439ded005cffd525ffe874f535fca7a4da1f49
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

However, I guess an error when I open the file in MSO Excel 2010
Comment 16 Xisco Faulí 2017-10-07 08:34:53 UTC
More than an error, it's a repairing warning: Repaired Records: PivotTable report from /xl/pivotTables/pivotTable1.xml part (PivotTable view)
Comment 17 Tamás Zolnai 2017-10-07 13:26:34 UTC
Hi,

Sorry, I forgot to add myself to CC, so can't see the discussion. I tested the test document again on master today and I also get the repair dialog when opening the saved XLSX in Excel. I'll check what the issue there, must be a recent regression.
Comment 18 Commit Notification 2017-10-07 15:32:24 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe6ea004872c86c4a2e5849c7c9e75905711d6f3

tdf#109016: Avoid to write the same pivot item member more times

It will be available in 6.0.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 19 Tamás Zolnai 2017-10-07 15:45:36 UTC
Hi Gabor,

The corruption issue is fixed now. I don't experience endless loop. It's not clear when it comes up for you. Do you save XLSX, then open it again in Calc and save it again in XLSX? or what the actual steps? Anyway, this endless loop might be related to the same issue my commit fixed, so please test again and if still experience an issue, add some more specific reproducer steps.

Thanks,
Comment 20 Xisco Faulí 2017-11-09 07:48:06 UTC
A polite ping to Tamás Zolnai: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks