alex sato schrieb:
Regina, thanks for your answer.
But can you tell me how to call Calc functions inside the macro?
I searched in docs and in the Google and don't found any clue.
It is done with the service FunctionAccess, see
and the there linked section in the Developers guide.
Here a very simple example, how it looks in Basic
function MYPRODUCT (byVal x as double,byVal y as double) as double
dim oFunction as variant
oFunction = createUnoService("com.sun.star.sheet.FunctionAccess")
dim aArgument(1) as variant
dim result as double
result = oFunction.callFunction( "PRODUCT", aArgument() )
MYPRODUCT = result
If you search for createUnoService("com.sun.star.sheet.FunctionAccess")
you will get a lot of relevant hits.
By the way, just now I tought the possibility to rewrite math functions
using "string" to encode the number to avoid error because I remembered
What is your goal? There is no silver bullet that fits all problems, but
perhaps you can get a helpful tip or trick.
For unsubscribe instructions e-mail to: email@example.com
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy