Bug 158921 - Exported pivot table with custom name field yields corrupt XLSX when opened in MSO
Summary: Exported pivot table with custom name field yields corrupt XLSX when opened i...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: target:26.2.0 target:25.8.4
Keywords: filter:xlsx, implementationError
Depends on:
Blocks: XLSX-Corrupted Pivot-Table-XLSX
  Show dependency treegraph
 
Reported: 2023-12-29 12:33 UTC by eisa01
Modified: 2025-11-27 15:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case - export to xlsx (10.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-12-29 12:34 UTC, eisa01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eisa01 2023-12-29 12:33:10 UTC
Description:
Discovered while testing bug 60169, test case taken from there
The attachment has a custom label for the grand total field

Steps to Reproduce:
1. Export to xlsx
2. Open in MSO


Actual Results:
Be warned that the file is corrupt and need to be repaired

Expected Results:
No warning


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.0.0.beta1 (AARCH64) / LibreOffice Community
Build ID: 5f390384195b7264c6e52add9e90a39790285249
CPU threads: 10; OS: macOS 14.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 eisa01 2023-12-29 12:34:28 UTC
Created attachment 191627 [details]
Test case - export to xlsx
Comment 2 m_a_riosv 2023-12-30 01:53:20 UTC
Reproducible
Version: 24.2.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 5f390384195b7264c6e52add9e90a39790285249
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Microsoft® Excel® para Microsoft 365 MSO (versión 2311 compilación 16.0.17029.20028) de 64 bits
Comment 3 Timur 2025-03-13 13:44:52 UTC
Happening from 6.1 but before table was not pivot, so this is incompleteImplementation, marked implementationError.
Comment 4 Commit Notification 2025-11-19 04:37:10 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b5837d2667c2be2c485753f9cf75e84032a15f74

tdf#158921: fix invalid OOXML during pivot table export

It will be available in 26.2.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.
Comment 5 Commit Notification 2025-11-25 08:55:31 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/51b07c37249ac709b6276138db177c64c16dc9f1

tdf#158921: sc_subsequent_export_test4: Add test

It will be available in 26.2.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.
Comment 6 Commit Notification 2025-11-27 15:34:37 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/a62e6c819192d77251a9643dc229b82fcdcc6c91

tdf#158921: fix invalid OOXML during pivot table export

It will be available in 25.8.4.

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.