Bug 100822 - FILEOPEN: xlsx file: imported DateTime cells are empty with certain non-en_US locales (Excel 2010 compatible)
Summary: FILEOPEN: xlsx file: imported DateTime cells are empty with certain non-en_US...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
QA Contact:
URL:
Whiteboard: target:6.0.0 target:5.3.7 target:5.4.3
Keywords: filter:xlsx
Depends on:
Blocks: Number-Format XLSX
  Show dependency treegraph
 
Reported: 2016-07-09 10:16 UTC by Falcon
Modified: 2017-10-01 18:59 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
xlsx with 2 datetime notation: 1 works fine and another is empty in Calc (4.43 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-07-09 10:16 UTC, Falcon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Falcon 2016-07-09 10:16:05 UTC
Created attachment 126132 [details]
xlsx with 2 datetime notation: 1 works fine and another is empty in Calc

Calc do not read DateTime in cells when date in ISO 8601 format (like "1961-04-12T07:55:00.123")!

By documentation (Ecma Office Open XML paragraph 18.18.11) ST_CellType cell type for DateTime are:
1. "n" and value for date is number (like "22383.32986")
example:
   <c r="C3" s="5" t="n">
    <v>22383.32986</v>
   </c>

2. "d" and value for date is datetime (like "1961-04-12T07:55:00.123")
example:
   <c r="C4" s="5" t="d">
    <v>1961-04-12T07:55:00.123</v>
   </c>

Calc ignores the second case.

In attachment xlsx in cells B3 and C3 datetime as number - and Calc ok, in cells B4 and D4 datetime in ISO 8601 format - and Calc ignores dates.

In Excel 2010 all cells shown fine.

Tested in LO Calc 4.3.3.2 in Debian 8 and LO Calc 5.1.3.2 in Windows 7.

(Document was created using ZEXMLSS 0.0.11)
Comment 1 Buovjaga 2016-07-17 08:36:40 UTC
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ab1b351840160655a9f0caedbb35e9fdf203c5a0
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on July 16th 2016
Comment 2 Marten Feldtmann 2017-06-22 18:56:21 UTC
Confirmed under Ubuntu 16.04

Windows and Linux LibreOffice Calc 5.1.6.2
Comment 3 Yousuf Philips (jay) 2017-07-03 00:38:08 UTC
It is running fine for me on Linux Mint 18 (Ubuntu 16.04 base) and Windows 8 with TDF builds from 4.2 and above.

Version: 4.2.8.2
Build ID: 48d50dbfc06349262c9d50868e5c1f630a573ebd

Version: 6.0.0.0.alpha0+
Build ID: 34c77d4bf3d2924c4ad26728d4c491b393fa0fc8
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group

@Xisco, @Stuart, @Cor: How does it appear for you guys, as Buovjaga has it broken in 5.3 alpha.
Comment 4 Buovjaga 2017-07-03 08:09:56 UTC
Looks like it is dependent on locale.
They show, if I change locale to English (USA)

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: 98befbb26217b0bf3f35354e418a355280c52cfc
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 29th 2017

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 5 Eike Rathke 2017-09-30 17:34:54 UTC
Investigating.
Comment 6 Commit Notification 2017-09-30 18:33:18 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5374c04a89e1720490a3625dfd95406c2d60c0cd

Resolves: tdf#100822 use sax::Converter::parseDateTime() for 'd' ISO 8601 date

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Eike Rathke 2017-09-30 18:38:17 UTC
Pending review
https://gerrit.libreoffice.org/42970 for 5-4
https://gerrit.libreoffice.org/42971 for 5-3
Comment 8 Commit Notification 2017-10-01 18:59:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d4dad2989071eb5a21d608aa5c3782a68fddf571&h=libreoffice-5-3

Resolves: tdf#100822 use sax::Converter::parseDateTime() for 'd' ISO 8601 date

It will be available in 5.3.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2017-10-01 18:59:50 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ffeaa487a9ba67eee816016e50b6092abb217003&h=libreoffice-5-4

Resolves: tdf#100822 use sax::Converter::parseDateTime() for 'd' ISO 8601 date

It will be available in 5.4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

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