On Sunday 24 April 2005 15:00, + Jahn, Ray (R.) wrote:
>  [ MODERATED ] ***********************
> Hi:
>
> OS = MS Windows 2000
>
> in OO Basic inside OO Calc 1.9.95
> writedbginfo( sheet_object ) indicates no
> FunctionAccess  service
> XFunctionAccess interface
>
> in DeveloperGuide, version 2.0
> 8.4.2 Function Handling
> com.sun.star.sheet.FunctionAccess  service
> com.sun.star.sheet.XFunctionAccess interface
>
> I am at a loss as how to call the built-in spreadsheet functions from
> scripts in OO 1.9.95, given the apparent conflict above.  An equivalent
> example in MS Excel VBA is given below.  Please advise if there is a better
> documentation to follow.
>
> Thanks.
>
> Ray
>
>  --- MS Excel VBA equivalent example
>
> dim answer as double
> answer = Application.min( num_1, cellobj_2, rangeobj_3, num_4 )
>
> ' same as the following
> ' answer = Application.WorksheetFunction.min( num_1, cellobj_2, rangeobj_3,
> num_4 )

As you are not subscribed you may not have seen that:
On Monday 25 April 2005 12:49, Andrew Douglas Pitonyak wrote:
>
> FunctionAccess is not supported by the Sheet object, it is available
> form the global service manager. You can query the global service
> manager and see what objects are supported if you like. To create one,
> simply use4 the following:
>
> *CreateUnoService("com.sun.star.sheet.FunctionAccess")*
>
>
> So, you finally have:
>
> Dim oFunction   'Use FunctionAccess service to call the Now function
> oFunction = CreateUnoService("com.sun.star.sheet.FunctionAccess")
> oFunction.NullDate = ThisComponent.NullDate
> oFunction.callFunction("NOW", Array())
>
> Inspect the value returned from the above call...


Also please be aware that to see all responses you should really subscribe to 
the mailing list and [email protected] is the best mailing list for 
macro questions.

Please reply to [email protected] only.

-- 
CPH : openoffice.org contributor

Maybe your question has been answered already?
                                http://user-faq.openoffice.org/#FAQ

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to