The category table of ECMA-376 5th edition Part 1 (December 2016) section 18.17.7 lists seventeen information functions: CELL, ERROR.TYPE, INFO, ISBLANK, ISERR, ISERROR, ISEVEN, ISLOGICAL, ISNA, ISNONTEXT, ISNUMBER, ISODD, ISREF, ISTEXT, N, NA and TYPE. This page gives each one’s syntax, arguments, return value and examples as the standard states them, then [MS-OI29500] v20260818’s notes on what Office does differently, then what LibreOffice returns. Section numbers in the headings are the standard’s own. The functions that Excel added later (ISFORMULA, ISOMITTED, SHEET, SHEETS and others) are not in Part 1 and are not described here.
How the examples were checked
The examples of the standard and edge cases were written as 97 formulas in a flat ODS workbook, made by
samples/xlsx/oracle/make-fods.mjs from formulas.txt, and converted to CSV by
LibreOffice (soffice --headless --convert-to csv; files in samples/xlsx/oracle/infofn/). The
cells the examples call A10 and so on are on a second sheet: 123, "ABC",
TRUE, #DIV/0!, #N/A, an empty cell, -15, and one cell for
each of #NUM!, #NAME?, #REF!, #VALUE! and #NULL!. LibreOffice is an implementation, not the standard: where
it differs the difference is reported, not corrected. Errors appear in LibreOffice’s own spellings:
Err:502 (invalid argument), Err:504 (error in the parameter list),
Err:508 (bracket or syntax error), Err:539 (invalid inline array).
The standard writes a few examples with a curly-brace array whose items mix types, for example
ISLOGICAL({TRUE,2}) and TYPE({TRUE,2.5,#N/A}). LibreOffice does not accept such an
array in a formula (Err:539), so those four examples have no LibreOffice result.
The IS functions
All take one argument, value, and return a logical value. For ISBLANK, ISERR, ISERROR,
ISLOGICAL, ISNA, ISNONTEXT, ISNUMBER, ISREF and ISTEXT the standard says “No conversion shall take place
on an argument passed to this function”; for ISEVEN and ISODD the argument is a number that is truncated
to an integer.
| Function | The standard: TRUE when | Standard’s examples | LibreOffice |
|---|---|---|---|
ISBLANK(value) (.174) | value refers to an empty cell | TRUE when A10 is empty; FALSE when A10 is 123 | TRUE; FALSE. ISBLANK("") is FALSE |
ISERR(value) (.175) | value is any error value except #N/A | TRUE for #DIV/0!; FALSE for #N/A | TRUE; FALSE |
ISERROR(value) (.176) | value is any error value | TRUE for #DIV/0! | TRUE; FALSE for 123 |
ISEVEN(value) (.177) | value is an even number or refers to a cell with one; truncated to an integer | ISEVEN(12.456) TRUE; A10 = -15: FALSE | TRUE; FALSE. ISEVEN(-2.5) TRUE (truncates to -2); ISEVEN("a") Err:504; ISEVEN(TRUE) FALSE |
ISLOGICAL(value) (.178) | value is, or refers to a cell with, a logical value | ISLOGICAL(TRUE) TRUE; A10 = 123: FALSE; {TRUE,2} TRUE; {2,TRUE} FALSE (only the first item of an array counts) | TRUE; FALSE; the two array cases Err:539 (see above) |
ISNA(value) (.179) | value is the error #N/A | the standard’s two examples are written ISERR(A1) and ISERR(B1) (a slip: they illustrate ISNA); #N/A: TRUE; #DIV/0!: standard says TRUE, which contradicts the description | ISNA(#N/A) TRUE; ISNA(#DIV/0!) FALSE, as the description says |
ISNONTEXT(value) (.180) | value is not text and does not refer to a cell with text; an empty cell is not text | "ABC" FALSE; A10 = 123: TRUE; {1,"ABC"} TRUE; {"ABC",1} FALSE | FALSE; TRUE; TRUE; FALSE (first item of the array) |
ISNUMBER(value) (.181) | value is, or refers to a cell with, a number | 10.56 TRUE; A10 = ABC: FALSE; {1,"ABC"} TRUE; {"ABC",1} FALSE | TRUE; FALSE; TRUE; FALSE. ISNUMBER(TRUE) is TRUE in LibreOffice, which keeps logical values as numbers |
ISODD(value) (.183) | value is an odd number or refers to a cell with one; truncated to an integer | ISODD(12.456) FALSE; A10 = -15: TRUE | FALSE; TRUE |
ISREF(value) (.185) | value is a cell reference | ISREF("ABC") FALSE; ISREF(A10) TRUE | FALSE; TRUE |
ISTEXT(value) (.186) | value is, or refers to a cell with, text | "ABC" TRUE; A10 = 123: FALSE; {1,"ABC"} FALSE; {"ABC",1} TRUE | TRUE; FALSE; FALSE; TRUE |
The ISERR and ISNA examples in the standard also give ISERR(A1) TRUE if A1 evaluates to #N/A under
ISNA, which would contradict ISERR’s own description; this page follows the descriptions, which LibreOffice
confirms. Excel notes: [MS-OI29500] has no note on any IS function in the 18.17.7 range read
(the notes for CELL, ERROR.TYPE, INFO, N and TYPE are given below).
ERROR.TYPE (18.17.7.110)
ERROR.TYPE ( value ): the kind of the error value. value is any type, no conversion.
Returns a number:
| Error | Returned (standard) | LibreOffice |
|---|---|---|
| #NULL! | 1 | 1 |
| #DIV/0! | 2 | 2 |
| #VALUE! | 3 | 3 |
| #REF! | 4 | 4 |
| #NAME? | 5 | 5 |
| #NUM! | 6 | #N/A for the cell SQRT(-1), which LibreOffice stores as Err:502, not as an error value of the standard |
| #N/A | 7 | 7 |
| #GETTING_DATA | 8 | the name is not accepted in a formula (Err:508) |
| anything else, a non-error value | #N/A | #N/A |
The standard’s example ERROR.TYPE(A1) = 4 “if A1 evaluates to #REF/0!” is a
misprint for #REF!. Excel note (MS-OI29500 2.1.949): the standard states the return values
1–7 or #N/A; Office can also return 8, for #GETTING_DATA.
N (18.17.7.223) and NA (18.17.7.224)
N ( value ): converts value (any type), or the value of the cell it references, to a
number: a number stays; TRUE 1; FALSE 0; an error value stays that error; anything else including an array and
text gives 0. NA ( ) takes no arguments and gives the error #N/A.
| Standard’s example | Standard says | LibreOffice |
|---|---|---|
N(10.5) | 10.5 | 10.5 |
N(A10), A10 = -1234 | -1234 | -15 for the cell holding -15 (same rule) |
N("ABC"); N(A10), A10 = ABC | 0; 0 | 0; 0. N("12") is also 0 |
N(TRUE); N(A10), A10 = FALSE | 1; 0 | 1; 0 |
N(A10), A10 = #N/A | #N/A | #N/A |
N({12.5,13.6,56.9}) | 12.5 (as the example writes it, although the table says an array gives 0) | 12.5 (the first item) |
N(A10:A11), A10 = FALSE, A11 = 321 | 0 | #VALUE! (a range of two cells in a formula in a single cell) |
NA() | #N/A | #N/A |
IF(ISNA(NA()),"T","F") | T | T |
Excel note (MS-OI29500 2.1.998): the standard says an array gives 0; Office does not treat an
array as a special case, it returns 0 for anything else, including text. The standard’s own example
N({12.5,13.6,56.9}) = 12.50, which gives the first item, contradicts its table; LibreOffice agrees
with the example.
TYPE (18.17.7.334)
TYPE ( value ): the type of value, or of the value in the cell it references. Number
1, text 2, logical 4, error value 16, array of any kind 64.
| Standard’s example | Standard says | LibreOffice |
|---|---|---|
TYPE(10.5); a cell with a number | 1 | 1; 1 |
TYPE("ABC"); a cell with a string | 2 | 2; 2 |
TYPE(TRUE); a cell with a logical value | 4 | 1; 1 (LibreOffice stores logical values as numbers and reports type 1) |
TYPE(5/0); a cell with an error | 16 | 16; 16 |
TYPE({1,2,3}) | 64 | 64 |
TYPE({TRUE,2.5,#N/A}) | 64 | Err:539 (mixed-type array not accepted) |
TYPE(IF(10>5,"Yes",20)); TYPE(IF(10<5,"Yes",20)) | 2; 1 | 2; 1 |
Excel note (MS-OI29500 2.1.1059): the standard says the argument can be of any type; Office allows any type except a reference.
CELL (18.17.7.34)
CELL ( category [ , reference ] ): information about the formatting, location or contents of the
upper-left cell of reference. If reference is omitted it is the most recently changed
cell. category is text:
| category | Meaning (standard) | Result | LibreOffice (cell A1 = 123, A2 = ABC) |
|---|---|---|---|
| "address" | reference of the first cell | text | $d.$A$1 (LibreOffice’s own sheet separator) |
| "col" | column number | number | 2 for B3 |
| "color" | 1 if negative numbers are in colour, else 0; 0 if not a number | number | 0 |
| "contents" | value of the upper-left cell | text or number | ABC; 123 (for the range A1:B3 the first cell) |
| "filename" | fully qualified file name; empty if not yet saved | text | 'file:///...fods'#$d (LibreOffice URL form, not the standard’s E:\Formulas\[Test.xlsx]Sheet1) |
| "format" | number format code, see below | text | F0 for a General cell holding 123 and for one holding text, where the rules below give G |
| "parentheses" | 1 if positive or all values are in parentheses, else 0; 0 if not a number | number | 0 |
| "prefix" | label prefix: ' for left-aligned text, " right, ^ centred, \ fill; empty otherwise | text | ' for the text cell |
| "protect" | 0 if the cell is not locked, else 1 | number | 1 (locked by default) |
| "row" | row number | number | 3 for B3 |
| "type" | "b" blank, "l" label (text constant), "v" value (anything else) | text | l for text, v for a number, b for an empty cell |
| "width" | column width rounded to an integer, in characters of the default font | number | 11 |
A category that is not one of these gives #VALUE! in the standard; LibreOffice gives Err:502. The standard also
lets non-English locales use translated category names (a table of 24 locales follows the category table in
18.17.7.34; strongly discouraged by the standard, because other applications may not support them).
Excel note (MS-OI29500 2.1.896 a): the standard does not specify the locale strings; Office
accepts the English names or the translations in the locale table of the note, which has two more columns
than the standard’s, coord and Sheet, for categories the standard’s table
does not list. The categories coord and sheet are not defined in Part 1.
The "format" result
The standard gives the rules that produce the text, in three steps. (1) If the first interpreted symbols of
the first number-format section are date or time characters, the first one or two characters come from the order
of the symbols: day, month, year gives D1; day, month, not year D2; month, year D3; month, day, year D4; month,
day, not year D5; hours, minutes, seconds, AM/PM D6; hours, minutes, AM/PM D7; hours, minutes, seconds, no AM/PM
D8; hours, minutes, no seconds or AM/PM D9; any other combination G, or C depending on whether there is a
$ in the first condition. (2) Otherwise the first character comes from which of @,
$, %, E are present in the first section: @ alone G;
@ and $ C; @, $, % P; adding E S;
a run of 0, #, ? with a comma followed by another such run (not after a
period or an interpreted character) “,”; if one of the earlier codes is present and at least one
of 0, ?, # is present F; any other case G. (3) Append: after C, F, S, P
or “,” the number of #, ?, 0 characters to the right of the
first period in the first section; after C with none of those symbols, 15 or the length of the string after
the first $; () if the first section contains an open parenthesis; a minus sign if the
second section contains a colour ([Red], [Black], [Green], [White], [Blue], [Magenta], [Yellow] or [Cyan]).
The standard’s examples: General text G; (123.00) F2-; $123,456.780 C3-;
1.235E+05 S3; CELL("prefix") of text ‘; CELL("type") of text l;
CELL("address",A10) might be $E$289.
The format rules were not run against LibreOffice (see Not described); the single observation is that
LibreOffice returns F0 for a General number where rule 2 gives G.
Excel note (MS-OI29500 2.1.896 b): the standard does not fully specify the details of the
format category; the note restates that the result depends on the number format code of the
upper-left cell.
INFO (18.17.7.168)
INFO ( category ): an operating-environment value. category is text, not
case-sensitive; an unknown category gives #VALUE!.
| category | Meaning (standard) | Type | Excel (MS-OI29500 2.1.975) | LibreOffice here |
|---|---|---|---|---|
| "directory" | path of the current directory | text | #N/A | |
| "memavail" | memory available, bytes | number | always #N/A | #N/A |
| "memused" | memory used for data | number | always #N/A | #N/A |
| "numfile" | number of active worksheets in open workbooks | number | 1 (one sheet-pair workbook open) | |
| "origin" | absolute reference of the top-left visible cell, prefixed $A:, e.g. $A:$D$9 | text | #N/A | |
| "osversion" | operating system version | text | Windows (32-bit) NT 5.01 (a constant, on macOS too) | |
| "recalc" | "Automatic" or "Manual" | text | Automatic | |
| "release" | version of the implementation | text | a 40-character hexadecimal build identifier (the standard’s example is 11.0) | |
| "system" | name of the operating environment | text | MACOSX; INFO("SYSTEM") gives the same | |
| "totmem" | total memory, bytes | number | always #N/A | #N/A |
An unknown category: standard #VALUE!; LibreOffice Err:502. Excel note (2.1.975 d to f):
Office also accepts mode (returns 1), ostreturncode (as the note spells it, returns
0) and setlang (returns locale information), none of which the standard lists.
What the viewer does
The viewer shows the value a cell stores and never recalculates a worksheet. Its conditional-format rules
(explorer/formats/xlsx/cf.js) calculate ISBLANK, ISNUMBER, ISTEXT, ISNONTEXT, ISERROR, ISERR,
ISNA, ISLOGICAL, ISEVEN and ISODD. Twenty cases of the oracle above (ISBLANK, ISERR, ISERROR, ISEVEN,
ISLOGICAL, ISNA, ISNONTEXT, ISNUMBER, ISODD, ISTEXT over a number, text, logical, error, empty and negative cell
and over constants) give the same result in the calculator and in LibreOffice (test-xlsx-built.mjs). ISREF,
ERROR.TYPE, N, NA, TYPE, CELL and INFO are not in the calculator: a rule that needs one is reported as not
calculated and is not applied.
See also
- Formulas: constants, error values, references
- Functions: logical
- Functions: lookup and reference
- Styles part: number formats that CELL("format") reads
Not described on this page
- Excel’s own results: only [MS-OI29500] was read; Excel was not run, so the last column is LibreOffice, not Excel.
- The CELL "format", "color" and "parentheses" results for formatted cells: the rules are quoted from the standard, but no workbook with number formats was run through LibreOffice.
- The examples with mixed-type array constants (four cases): LibreOffice has no result.
- The other categories of 18.17.7: engineering, statistical, financial, database, cube, web and the math functions outside the math page.
Sources
- ECMA-376 5th edition Part 1, research/ooxml/ecma376/p1/part1.txt: category table (line 77016), 18.17.7.34 CELL (line 78355), .110 ERROR.TYPE (81803), .168 INFO (83571), .174 to .181 ISBLANK to ISNUMBER (83869 to 83993), .183 ISODD (84020), .185 ISREF (84054), .186 ISTEXT (84070), .223 N (85271), .224 NA (85303), .334 TYPE (89304)
- [MS-OI29500] v20260818, research/ooxml/ms/MS-OI29500.txt, notes 2.1.896 (line 18101), 2.1.949 (18940), 2.1.975 (19108), 2.1.998 (19419), 2.1.1059 (20124)
- LibreOffice, soffice headless, flat ODS to CSV: samples/xlsx/oracle/infofn/