2

I've read here that we can use a pretty complicated syntax in order to have access to LibreOffice functions in the Basic macro editor, rather than writing functions in a sheet and get the data back.

Are there current best practices related to this problem, i.e. obtain a result without writing a formula to a sheet ?

Class Skeleton
  • 2,913
  • 6
  • 31
  • 51
Samuel
  • 594
  • 1
  • 6
  • 22
  • 1
    Other than general programming best practices of keeping code neat and commented, I'm not aware of any particular practices related to calling the FunctionAccess service. You might be interested to know that some of these functions can also be applied to an object by calling [com.sun.star.sheet.GeneralFunction](http://www.openoffice.org/api/docs/common/ref/com/sun/star/sheet/GeneralFunction.html), for example to count the number of entries in a spreadsheet column `oColumn.computeFunction(com.sun.star.sheet.GeneralFunction.COUNT)` – Lyrl May 12 '15 at 19:41
  • Thanks. How to do this with a multiple arguments function then ? [This method](http://www.oooforum.org/forum/viewtopic.phtml?p=54844&sid=03c9fbf9ce8e684bd1bccff488d38a09#54844) doesn't work for me : I get an IllegalArgumentException on Array(oRange, 2.5, 1.0) :( ! – Samuel May 13 '15 at 10:37
  • That forum seems down. I've posted [a copy here](http://stackoverflow.com/questions/30216466/how-to-use-libreoffice-functions-into-basic). – Samuel May 13 '15 at 13:34

0 Answers0