[Libreoffice-bugs] [Bug 70882] FormulaResultType return VALUE for cells with formula result #DIV/0! or #NAME?

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Mar 20 07:19:35 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=70882

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTABUG
             Status|NEW                         |RESOLVED

--- Comment #7 from Mike Kaganski <mikekaganski at hotmail.com> ---
This is not a bug.

As described in description of FormulaResultType attribute of SheetCell Service
Reference [1], its return value is CellContentType (see comment 6), which lacks
any ERROR value (and it's impossible to change the enumeration, because it's
breaking the API and ABI); to obtain a com::sun::star::sheet::FormulaResult
constant (having ERROR value), you need to use FormulaResultType2 attribute of
the same service (which likely was introduced for that very reason).

Or you can use getError() of XCell Interface [2], like described in [3].

[1]
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SheetCell.html#affda686bb18571c67c625c9adc1c85f9
[2]
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1table_1_1XCell.html#a79278ec2dc4228f41254eef7e33729f0
[3]
https://ask.libreoffice.org/en/question/83622/macro-how-to-get-a-cell-value-set-by-a-formula/

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200320/dda2e925/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list