Description: Attached simple XLSX file contains date formatted cells with the default locale-dependent Excel format in A2:A3. After saving the file in Calc the date format changes to Custom “[$-409]h.n.éééé” ([$-409]m.d.yyyy in Excel 2013 using English locale and [$-40E]éééé.hh.nn ([$-40E]yyyy.mm.dd) using Hungarian locale. Steps to Reproduce: 1. Open attached file in Calc and save it as XLSX. Actual Results: Excel does not recognize the cell format as Date, instead it lists it under Custom. Expected Results: Excel recognizes the cell format as Date – Locale-dependent default. Reproducible: Always User Profile Reset: No Additional Info:
Created attachment 157123 [details] Example file from Excel
Created attachment 157124 [details] The original file saved by Calc.
Created attachment 157125 [details] Screenshot of the original document side by side in Excel.
Created attachment 157126 [details] Screenshot of the exported document in Excel
Comment on attachment 157123 [details] Example file from Excel Example file from Excel.
Bibisected using bibisect-win32-6.2 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=d0f8daa0980ba8e403b32006831657c5a0a4ea17 author Eike Rathke <erack@redhat.com> 2018-08-22 13:16:19 +0200 committer Eike Rathke <erack@redhat.com> 2018-08-22 19:03:27 +0200 Resolves: tdf#73063 preserve and roundtrip LCID from/to Excel number formats
Moving to NEW as it has been bisected
For the record, I can reproduce it in Version: 6.5.0.0.alpha0+ Build ID: fc1f85127968d1c2e0a53dace51bf8a78f9e6ca5 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded and MSO Excel 2010 @Eike, would you mind taking a look ?
This is an import failure that apparently always existed but had no consequences so far. Note that the date format here in LO becomes a fixed-locale format (e.g. English-US or Hungarian) and not a system locale format (e.g. Default English-US or Default Hungarian). Since the commit mentioned that is exported as such as it should.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5b88a664b1ad2b5761a4672678845cc77be6cd4d Resolves: tdf#129985 OOXML import: do not force a fixed-locale number format It will be available in 7.0.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.
Pending review https://gerrit.libreoffice.org/c/core/+/90399 for 6-4
Verified in Version: 7.0.0.0.alpha0+ Build ID: 5a2c340e00050e21f29ae880593ef4f9ec1ba08d CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; Locale: en-US (en_US.UTF-8); UI-Language: en-US Calc: threaded @Eike, thanks for fixing this issue!! Unittest created: https://gerrit.libreoffice.org/c/core/+/90573
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/95d35dd3109263a1708fab143accc0f45a05758d Resolves: tdf#129985 OOXML import: do not force a fixed-locale number format It will be available in 6.4.3. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2f7f34bf9fb744a2615426e4414dff3ca6fbe6e4 tdf#129985: Add unittest It will be available in 7.0.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.