-
Type: Bug
-
Status: Closed
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: ODF 1.2 Part 2 CD 2
-
Component/s: OpenFormula
-
Labels:None
-
Proposal:
-
Resolution:
In the reference paragraph (final paragraph of 3.1 in the current public version) (NOTE: this is now (draft18) in section 3.7 Reference) we say:
" An empty cell is neither zero nor the empty string, and an empty cell can be distinguished from cells containing values (including zero and the empty string) by some functions (such as ISBLANK and COUNTBLANK). An empty cell is not the same as an Error, in particular, it is distinguishable from the Error #N/A (not available). As discussed below, in many scalar contexts a reference to an empty cell is converted into 0 or the empty string, and in most sequences empty cells are automatically omitted. If the outermost expression is a reference to an empty cell, it shall be converted to the number 0."
But, if we look at COUNTBLANK we find:
" A cell is blank if the cell is empty for purposes of COUNTBLANK. If ISBLANK(R) is true, then it is blank. A cell with numeric value zero ('0') is not blank. It is implementation-defined whether or not a cell returning the empty string ("") is considered blank; because of this, there is a (potential) subtle difference between COUNTBLANK and ISBLANK."
And if we look at ISBLANK we find:
"If X is a reference to a cell, examine the cell; if it is blank (has no value), return TRUE, but if it has a value, return FALSE. A cell with the empty string is not considered blank."
We need a consistent definition of empty cell that can be defined once. Across all functions that may encounter an empty cell.
It isn't clear why there is a special rule for the "outermost" expression, assuming that's meaningful, in the last sentence.
Question: Do we define for scalar functions whether they return 0 or the empty string?
See also OFFICE-2370.