<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:oliver.brinzing@gmx.de" title="Oliver Brinzing <oliver.brinzing@gmx.de>"> <span class="fn">Oliver Brinzing</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - MACRO setformula does not appear to work with array formula"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=130661">bug 130661</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>oliver.brinzing@gmx.de
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WORKSFORME
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>UNCONFIRMED
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - MACRO setformula does not appear to work with array formula"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=130661#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - MACRO setformula does not appear to work with array formula"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=130661">bug 130661</a>
from <span class="vcard"><a class="email" href="mailto:oliver.brinzing@gmx.de" title="Oliver Brinzing <oliver.brinzing@gmx.de>"> <span class="fn">Oliver Brinzing</span></a>
</span></b>
<pre>(In reply to christophe.alviset from <a href="show_bug.cgi?id=130661#c0">comment #0</a>)
<span class="quote">> 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.</span >
Please try with setArrayFormula(), e.g:
ThisComponent.getSheets().getByIndex(0).getCellByPosition(0,2).setArrayFormula("=SUM((A1:A2)*(B1:B2))")</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>