[Libreoffice-bugs] [Bug 130661] MACRO setformula does not appear to work with array formula
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Feb 14 18:04:47 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=130661
Oliver Brinzing <oliver.brinzing at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oliver.brinzing at gmx.de
Resolution|--- |WORKSFORME
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Oliver Brinzing <oliver.brinzing at gmx.de> ---
(In reply to christophe.alviset from comment #0)
> I am using array formulas. For some reason, while using macros or sorting or
> something else, the array formulas go away and I am left with simple
> formulas (ie SUM(...) instead of {SUM(...)}
>
> I want to write a macro to reset these cells to array formulas, but
> setformula does not seem to work with an array formula. It sets a string.
Please try with setArrayFormula(), e.g:
ThisComponent.getSheets().getByIndex(0).getCellByPosition(0,2).setArrayFormula("=SUM((A1:A2)*(B1:B2))")
--
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/20200214/c204c107/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list