Bug 124772 - Number format in pivot table saved as XLSX resets after refreshing table in Excel
Summary: Number format in pivot table saved as XLSX resets after refreshing table in E...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.3.0
Keywords: filter:xlsx
Depends on:
Blocks: Pivot-Table-XLSX
  Show dependency treegraph
 
Reported: 2019-04-16 12:36 UTC by Aron Budea
Modified: 2019-04-20 19:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2019-04-16 12:36:43 UTC
The samples are two similar pivot tables, one created in Excel (bug 123421), and another in Calc (bug 108343).

- Open Calc-created attachment 149245 [details] (bug 123421) and save it as XLSX, or Excel-created attachment 133861 [details] (bug 108343) and save it again as XLSX.
- Open in Excel (the first sample needs bug 123421's fix to work), right-click table and choose Refresh.

=> Note the following:
- number formats disappear,
- the borders fade,
- the grey background of the fields (Country, Product) disappears (already upon import).

Out of these the first two are particularly problematic, the third is nice to have.

A couple of other smaller differences worth noting (but no need to deal with them):
- Calc's format for unfiltered values is "- all -", while Excel's is "(All)", probably can't be handled in a consistent way (ie. if "(All)" is exported, then Calc will again change it when working on the file again, if it's changed internally for Excel files, then it won't be consistent within Calc),
- similarly, Calc uses "Total Result", while Excel uses "Grand Total",
- the header of the sum column, which is "Sum - Amount" disappears in Excel upon Refresh (in the Excel sample the original column header is "Sum of Amount"),
- in the Excel-created sample the "Product" field is originally "Row Labels" instead, not sure why,
- in the Excel-created sample the original formatting is fancy, the styles are likely be hard ot support, perhaps roundtripping it in the grab-bag could be considered.

Observed using LO 6.3.0.0.alpha0+ (2e3b0c5d42d60d46cd9f8b8eda9424b095c63418), 6.0.0.3 / Windows 7.
Comment 1 Mike Kaganski 2019-04-17 09:06:02 UTC
Let's limit this one with exporting number formats.

https://gerrit.libreoffice.org/70860 should handle this.
Comment 2 Commit Notification 2019-04-17 11:02:31 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/26e85974a0287ab5869e7ff0145a66b853d66a02%5E%21

tdf#124772: export data field number format to XLSX

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.
Comment 3 Aron Budea 2019-04-18 04:55:14 UTC
Bug 124810 has been opened on the remaining formatting issues. Thanks for fixing this, Mike!