Bug 37256 - EDITING Calc DCOUNT function does not throw error in malformed expression =DCOUNT(A4:E13,0,A16:E17)
Summary: EDITING Calc DCOUNT function does not throw error in malformed expression =DC...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: x86 (IA32) Linux (All)
: lowest enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-16 07:04 UTC by Chris Peñalver
Modified: 2014-11-04 03:32 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
OO_DCOUNT_problem_2.ods (20.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-05-16 07:04 UTC, Chris Peñalver
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Peñalver 2011-05-16 07:04:10 UTC
Created attachment 46765 [details]
OO_DCOUNT_problem_2.ods

Downstream bug may be found at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/681080

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-proposed/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

LibreOffice 3.4.0
DEV300m103 (Build:5)

3) What is expected to happen in LibreOffice Calc via the Terminal:

cd ~/Desktop && wget https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/681080/+attachment/1743794/+files/OO_DCOUNT_problem_2.ods && localc -nologo OO_DCOUNT_problem_2.ods

is Sheet 1, cell B19's formula:

=DCOUNT(A4:E13,0,A16:E17)

throws an error as it is a malformed expression pointing to a non-existent column 0.

4) What happens instead is it erroneously yields 5. Occurs in both Ubuntu LO & 3.4.0 Beta.
Comment 1 Markus Mohrhard 2011-07-20 03:08:25 UTC
this is not a bug

as http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_DCOUNT_function mentions 0 is used for all columns
Comment 2 Chris Peñalver 2011-07-21 08:39:44 UTC
(In reply to comment #1)
> this is not a bug
> 
> as
> http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_DCOUNT_function
> mentions 0 is used for all columns

markus.mohrhard@googlemail.com, as mentioned in the above link:
"Issues:

The exact use of 0 as the field parameter is unclear, both in operation and in compatibility (issue 84168)".

As well, Microsoft clears up what it means via:
http://office.microsoft.com/en-us/excel-help/dcount-HP005209049.aspx

The field parameter is not supposed to have a 0 in it as field is the column to use. A 0 column does not make sense. Hence, LO should throw an error for Excel compatibility reasons (Gnumeric also throws the error appropriately).
Comment 3 Markus Mohrhard 2011-08-02 15:55:51 UTC
No we are not Excel and we have our own formula api. As mentionen in the link I posted O is allowed and refers to all columns.

This is not a bug but a feature! We are not a excel copy so we don't need to behave in the same way.
Comment 4 Chris Peñalver 2011-08-02 18:51:59 UTC
markus.mohrhard@googlemail.com, thank you for your attention on this issue.

(In reply to comment #3)
> No we are not Excel and we have our own formula api.

I never said LibreOffice was Excel.

> As mentionen in the link I posted O is allowed and refers to all columns.

While 0 is currently allowed, it does not hold compatibility with Excel or Gnumeric as noted in Comment #2.

> This is not a bug but a feature! 

Ok, this bug has been remarked as ENHANCEMENT.
Comment 5 Joel Madero 2014-11-04 03:32:43 UTC
As Markus already explained that this is a feature - it's not getting changed. Markus is one of our most experienced developers. Please don't reopen the bug.