Bug 124883 - Calc should correctly import and roundtrip data field names as defined in XLSX
Summary: Calc should correctly import and roundtrip data field names as defined in XLSX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Mike Kaganski
Whiteboard: target:6.3.0
Depends on:
Blocks: Pivot-Table-XLSX
  Show dependency treegraph
Reported: 2019-04-22 11:03 UTC by Mike Kaganski
Modified: 2019-04-22 13:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2019-04-22 11:03:49 UTC
Something like a follow-up of bug 124881.

1. Open attachment 133861 [details] from bug 108343 in Excel;
2. Change the name of the Data field (Values area in PivotTable Fields sidebar) from "Sum of Amount" to, say, "FooBar";
3. Save it in Excel;
4. Open it in current LO master;
5. Save as XLSX again;
6. Re-open in Excel.

The data field in the original XLSX is initially named "Sum of Amount" (default name automatically assigned by Excel on creation), changed to user-defined "FooBar". When imported to Calc, it's shown as "Sum - Amount". Prior to [1], Calc didn't export anything as the field's name; which allowed Excel (older than 2016) to re-construct the name *as default "Sum of Amount"*. After the said commit, Calc started to export empty string, forcing the name to be empty. With [2], it now exports a name *as generated by Calc*.

The problem is, Calc should read, use, and export the name as defined in original XLSX.

[1] https://git.libreoffice.org/core/+/1a28b0a602bb3c10f75c3c6408cf9bc555020d34
[2] https://git.libreoffice.org/core/+/e913727c7ee3af0bb4031c6829abfb3373306492
Comment 1 Mike Kaganski 2019-04-22 12:02:24 UTC
Comment 2 Commit Notification 2019-04-22 13:57:28 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":


tdf#124883: don't drop data field names on import

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:

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