Bug 168727 - FILESAVE XLSX Pivot table with #N/A error is invalid when opened in Excel
Summary: FILESAVE XLSX Pivot table with #N/A error is invalid when opened in Excel
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: XLSX-Corrupted Pivot-Table-XLSX
  Show dependency treegraph
 
Reported: 2025-10-07 09:38 UTC by Gabor Kelemen (Collabora)
Modified: 2025-10-07 09:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Excel (12.99 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-10-07 09:38 UTC, Gabor Kelemen (Collabora)
Details
The example file saved with Calc master, in German UI (10.77 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-10-07 09:38 UTC, Gabor Kelemen (Collabora)
Details
The example file saved with Calc master, in English UI (10.86 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2025-10-07 09:51 UTC, Gabor Kelemen (Collabora)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (Collabora) 2025-10-07 09:38:24 UTC
Created attachment 203168 [details]
Example file from Excel

The data of the attached Excel-made file contains some cells with #N/A error, which are used in a pivot table.
When this is roundtripped in Calc with German UI language (but not English), the resulting file loses the pivot table when opened in Excel.

1. Set UI language and locale to German
2. Open attached file in Calc
3. Save as XLSX
4. Open the resulting file in Excel
-> Error is shown about invalid content:

Removed Feature: PivotTable report from /xl/pivotTables/pivotTable1.xml part (PivotTable view)
Removed Records: Workbook properties from /xl/workbook.xml part (Workbook)

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 708abf24664a9a1aaeac452bcc8436026030e74e
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: de-DE
Calc: threaded

Seems to be a case ever since 3.3, not a recent regression.
Comment 1 Gabor Kelemen (Collabora) 2025-10-07 09:38:50 UTC
Created attachment 203169 [details]
The example file saved with Calc master, in German UI
Comment 2 Gabor Kelemen (Collabora) 2025-10-07 09:51:51 UTC
Created attachment 203170 [details]
The example file saved with Calc master, in English UI

The suspicious part is in xl/pivotCache/pivotCacheDefinition1.xml:

  <cacheField name="Err" numFmtId="0">
   <sharedItems count="2">
    <s v="abc"/>
    <e v="#N/A"/>
   </sharedItems>
  </cacheField>

This is good in English saved version, but bad in German saved one:

  <cacheField name="Err" numFmtId="0">
   <sharedItems count="2">
    <s v="abc"/>
    <e v="#NV"/>
   </sharedItems>
  </cacheField>