[Libreoffice-bugs] [Bug 123407] Copy&Paste-Error in Date-Cells from XLSX to ODS
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Feb 15 12:27:19 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=123407
Eike Rathke <erack at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|filter:xlsx |
--- Comment #6 from Eike Rathke <erack at redhat.com> ---
Dates in Excel and Calc are just number of days since the document's null date,
and then the number is formatted as date. Some Excel for Mac versions (or if
explicitly set in options) used a null date of 1904-01-01 hence all dates are 4
years off if the numeric date value is pasted to a document with 1899-12-30
null date. This is not .xlsx specific.
There's not much we can do, other than if null dates differ for every cell
copied check if it's a date(+time) formatted cell and if so add the null date
difference. While that could work for plain date(+time) cells, it may introduce
unwanted effects if such cells' values were used in another numeric context.
Though I guess most spreadsheets don't use such features and DATEVALUE() also
takes the null date into account, but still, fiddling with the numeric cell
value is fragile and quirks hard to track for the user.
Btw, what does Excel do when copying dates between different null date
documents?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210215/d0d333de/attachment.htm>
More information about the Libreoffice-bugs
mailing list