Bug 124651 - Pivot table: saving this ODS as XLSX produces a file that makes Excel warn and delete pivot table
Summary: Pivot table: saving this ODS as XLSX produces a file that makes Excel warn an...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.2.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.3.0
Keywords: dataLoss, filter:xlsx
Depends on:
Blocks: XLSX-Corrupted Pivot-Table-XLSX
  Show dependency treegraph
 
Reported: 2019-04-10 11:14 UTC by Mike Kaganski
Modified: 2019-04-30 13:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A simplest pivot table ever (10.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-04-10 11:14 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-04-10 11:14:06 UTC
Created attachment 150658 [details]
A simplest pivot table ever

Saving this ODS as XLSX produces a file that makes Excel 2016 warn:

> We found a problem with some content in "0group.xlsx". Do you want us to recover as much as we can? If you trust the source of this workbook, click Yes.

and then delete pivot table:

> Removed Feature: PivotTable report from /xl/pivotTables/pivotTable1.xml part (PivotTable view)

Adding "name" attribute equal to empty string to /pivotTableDefinition/dataFields/dataField in xl/pivotTables/pivotTable1.xml makes Excel consume the file normally.

Looks like a bug in Excel, since ECMA-376 Part 1 defines CT_DataField's "name" attribute to be optional.

Tested with Version: 6.2.3.1 (x64)
Build ID: 9ba025bafb03b962c34687cf87806cc03a3a7436
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: CL
Comment 1 Mike Kaganski 2019-04-10 13:36:40 UTC
https://gerrit.libreoffice.org/70522
Comment 2 Roman Kuznetsov 2019-04-10 13:42:26 UTC
No problem in MS Excel 2010 and in Excel 2013 on Windows 7 after export from

Version: 6.3.0.0.alpha0+
Build ID: 7327260de3c0c627e62f7c3fddbe3d71ea88e88f
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-04-05_06:26:35
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 3 Mike Kaganski 2019-04-10 13:48:21 UTC
Apparently Excel 2016 problem... interesting to check if 2019 has this or not.
Comment 4 Commit Notification 2019-04-11 06:27:17 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/577b95f4d0cc1cf8836ff35fc30189c64fefb508%5E%21

tdf#124651: always write "name" attribute to dataField element

It will be available in 6.3.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

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