views:

447

answers:

1

I am writing an OpenOffice calc add-in that returns a range of strings:

public String[][] myFunc(int v0, com.sun.star.table.XCellRange v1)

When I try to use the function in OpenOffice and set a cell's value to

=myFunc(0;A1:B1)

Only the first value returned by myFunc is shown as the value of the cell. How can I make the value appear in a range of cells, to the effect of

C1:D1=myFunc(0;A1:B1)

?

Thank you.

+1  A: 

I found a link that explains this:

http://www.openofficetips.com/blog/archives/2004/10/array_formulas.html

In short, select cell C1, enter the formula =myFunc(0;A1:B1), and press Ctrl-Shift-Enter instead of Enter. This functionality doesn't seem to be accessible from the menu though. Not very intuitive I have to admit!

:)