Bug 94166 - lookup fails with documents created with a former version of calc
Summary: lookup fails with documents created with a former version of calc
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.1.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-12 17:13 UTC by palmierivinc.ent
Modified: 2015-09-12 21:20 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODS with sample lookup that fails (23.31 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-09-12 17:13 UTC, palmierivinc.ent
Details
ODS which correct behavior, rewriten from scratch with Calc 5.0.1.2 (19.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-09-12 17:15 UTC, palmierivinc.ent
Details

Note You need to log in before you can comment on or make changes to this bug.
Description palmierivinc.ent 2015-09-12 17:13:52 UTC
Created attachment 118642 [details]
ODS with sample lookup that fails

Here is a document created with a version < 4.0 of OpenOffice.
Some lookups show the results #N/D when a normal value is expected. I notice this behaviour when data and lookups are in a different tab.

I couldn't predict which cells give an incorrect answer, neither find a workaround to make it work fine, but it seems that this is dependant to the looked up value.

I noticed this with LibreOffice Calc 4.3.1, 5.0.0.5 and 5.0.1.2. When I rewrite the same file from scratch with Calc 5.0.1.2, I obtain the expected behaviour.

This may be related to Bug 74558.
Comment 1 palmierivinc.ent 2015-09-12 17:15:17 UTC
Created attachment 118643 [details]
ODS which correct behavior, rewriten from scratch with Calc 5.0.1.2
Comment 2 Cor Nouws 2015-09-12 19:25:33 UTC
Hi palmierivinc,

thanks for your report.
I confirm the behaviour.

When I remove row 1 on sheet data in misfunctionnal lookup.ods the VlookUp works fine.
Since the function gets the full columns as argument (data.D:D;data.A:A) that may be the cause?
Any idea on that?

Cheers - Cor
Comment 3 palmierivinc.ent 2015-09-12 20:35:09 UTC
Yes you got it :)

If I remove the first row, I still have some "#N/D". But if I remove the two first rows, the lookup works fine.

Another way to make it work fine is to fill D1 with "a  a" and D2 with "a   a" (so that the column D is fully sorted). If I put the argument (data.D$3:D$50;data.A$3:A$50), it works fine too.

When I rewrote the file from scratch, I forgot this blank line. Eventually, I obtain the same behaviour with all version of LibreOffice, caused by a lookup in an unsorted column.

So, unless I forgot something, this is not a bug. Thank you Cor Nouws !
Comment 4 Cor Nouws 2015-09-12 21:20:04 UTC
Thanks for confirming :)