Created attachment 47347 [details] vlookup testcase.xls Downstream bug may be found at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/381543 1) lsb_release -rd Description: Ubuntu 11.04 Release: 11.04 2) apt-cache policy libreoffice-calc libreoffice-calc: Installed: 1:3.3.2-1ubuntu5 Candidate: 1:3.3.2-1ubuntu5 Version table: *** 1:3.3.2-1ubuntu5 0 500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main i386 Packages 100 /var/lib/dpkg/status 1:3.3.2-1ubuntu4 0 500 http://us.archive.ubuntu.com/ubuntu/ natty/main i386 Packages 3) What is expected to happen in LibreOffice Calc via the Terminal: cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/381543/+attachment/596214/+files/vlookup%20testcase.xls && localc -nologo vlookup\ testcase.xls is the file obtains the same results as Excel or Gnumeric using VLOOKUP. 4) What happens instead is it does not.
Yes. ODF1.2 allows a single reference as second parameter. VLOOKUP has to be improved. I think, this is a candidate for the easy hack list.
(In reply to comment #1) > Yes. ODF1.2 allows a single reference as second parameter. VLOOKUP has to be > improved. Just 2 comments : 1. It is also the same thing for others search functions like MATCH. 2. MATCH(A1;A2;0) with both A1 & A2 contains "dog" don't work, but MATCH(A1;{"dog"};0) returns 1. Same for VLOOKUP, Array constant with single reference works.
Let's make this an EasyHack then. The code for VLOOKUP is in ScInterpreter::ScVLookup().
Created attachment 47856 [details] possible fix Let me attach a possible fix for this. It is for both VLOOKUP and HLOOKUP.
Yup, that's the right fix. I've pushed this to master & cherry-picked to the -3-4 branch with my sign-off. For future reference, it would be great if you could send your patches to the mailing list with [PATCH] in the subject line. Patches attached to bugzilla sometimes go unnoticed because we don't monitor it for patch submissions. Anyway, thanks a lot for the fix.
Migrating Whiteboard tags to Keywords: (EasyHack) [NinjaEdit]