Description: When copying cells with a date from a XLSX-File, that is saved in an "old" Excel format ("1904") to a new ODS-File via Copy&Paste, the date gets automatically transformed by 4 years and 1 day. Eg. 27.12.2018 changes to 26.12.2014 in new ODS. Correct: 27.12.2018 should not change. In the XLSX document under Tools - Options - LibreOffice Calc - Calculate, the date is set automatically at "01.01.1904". I suppose because the XLSX is a spreadsheet "in a foreign format". A standard ODS is set at "30.12.1899", so copy & pasting should honor the difference. Steps to Reproduce: 1. Copy cell with Date from XLSX-file (Strg-C) 2. Paste in empty ODS or new spreadsheet Actual Results: Date cell with content "22.1.2018" changes to "21.1.2014" Expected Results: Content of Date cell should not change after paste to ODS-spreadsheet Reproducible: Always User Profile Reset: No Additional Info: Clipboard contains "22.1.2018"
Created attachment 149226 [details] XLSX-File
Confirm with file from attach in Version: 6.1.4.2 Build ID: 1:6.1.4-0ubuntu0.18.10.1 CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; Locale: ru-RU (ru_RU.UTF-8); Calc: group threaded
Also reproduced in Version: 5.2.0.0.alpha0+ Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53 Threads 4; Ver: 4.15; Render: default; LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4 @Eike, I thought you could be interested in this issue...
Dear amersdorfer, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Bug is still present with current version: Version: 7.1.0.3 (x64) / LibreOffice Community Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: de-AT (de_AT); UI: de-DE Calc: threaded
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?
I understand your point, but the problem I see is the zero feedback by Calc, leading to data-loss/-corruption without knowing - we had this problem in our company with such an Excel-File. Copy&paste within (!) Libreoffice should at the very least point out possible data-corruption. Follow-up to your question. Tested copy&paste from above attachment with Online-Excel (office.com), as I do not have access to an installed Excel: 1. Opened file with Libreoffice. 2. Selected & copied multiple cells into clipboard. 3. Pasted cells in Online Excel. 4. Dates remained the same (2018), as should be expected. So even copy&paste from Libreoffice to Excel Online works but from Libreoffice to Libreoffice does not.
That's a completely different scenario though because copying from LibreOffice to Online Excel the online Excel probably chooses HTML (or whatever) clipboard format in which the internal number of days since null date cell content is not present but a date string instead, for example. The only valid comparison is to create a new document in Excel and loading the 1904 document in Excel and then copying from that to the newly created document. It may even be you have to use the "real" Excel not the online Excel because it might be the online Excel copies through a different clipboard format anyway. To expose this quirk the chosen clipboard format has to be one that uses the application internal representation of days since null date.
Dear amersdorfer, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
I was able to test the scenario with a current version of Excel and it gave the same result: The date is converted without any further information, so the behavior is equally unsatisfactory. Have therefore marked the still existing misbehavior as "resolved worksforme", even if - from my point of view - Libreoffice could go a better way here by means of a feedback when inserting. Version: 7.4.5.1 (x64) / LibreOffice Community Build ID: 9c0871452b3918c1019dde9bfac75448afc4b57f CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: de-AT (de_AT); UI: de-DE Calc: threaded
The original report is still reproducible in Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 14844d835cc5d6dfde499a0b1074aea5dcff4fc7 CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: en-US (es_ES.UTF-8); UI: en-US Calc: threaded