Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

Hi Alex,

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("")
dim aArgument(1) as variant
dim result as double
result = oFunction.callFunction( "PRODUCT", aArgument() )
MYPRODUCT = result
end function

If you search for createUnoService("") 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
BCD.  :-)

What is your goal? There is no silver bullet that fits all problems, but perhaps you can get a helpful tip or trick.

Kind regards

For unsubscribe instructions e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: 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.