Bug 96476 - Copy/paste special changing empty date fields to date
Summary: Copy/paste special changing empty date fields to date
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-14 09:34 UTC by Ari Latvala
Modified: 2015-12-15 00:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file demonstrating copy /paste special problem (11.99 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-12-14 09:34 UTC, Ari Latvala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ari Latvala 2015-12-14 09:34:06 UTC
Created attachment 121290 [details]
Test file demonstrating copy /paste special problem

Running LibreOffice 5.0.3.2 on Linux and LibreOffice 5.0.4.1 on 64-bit Windows 7.

When searching with vlookup date, then copying data without formulas to the new sheet, empty cells gets converted to 30.12.1899. Check the attached ODT test file with 3 sheets: "List" containing formulas, which are searching data from the "Inventory" sheet and "Summary" sheet is a result of "copy/paste special" of "List" with only Text, Numbers, Date&Time and Formats included. 
- Cells with empty value have changed to show 30.12.1899
- non-existing "host" cells showing correctly #N/A
- Cells with existing Date value showing correctly
Comment 1 raal 2015-12-14 20:27:44 UTC
I can confirm with Version: 5.2.0.0.alpha0+
Build ID: de9d0e797903e7ecc19be2b05c7e89d5936ae02d
Threads 4; Ver: Linux 4.2; Render: default; 

TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-12-03_04:13:00
Comment 2 m_a_riosv 2015-12-15 00:45:28 UTC
Hi,

From a VLOOKUP it's not possible to get an empty cell at most you can get a cell with an empty string.
List.B2
=IF(VLOOKUP(A2;Inventory.$A$1:$B$7;2;0);VLOOKUP(A2;Inventory.$A$1:$B$7;2;0);"")

Dates in calc are stored as integers being the zero 31/12/1899.

https://help.libreoffice.org/Calc/Date_and_Time_Functions