| View previous topic :: View next topic |
| Author |
Message |
eduzs OOo Advocate


Joined: 07 Feb 2005 Posts: 356 Location: RJ, BRAZIL
|
Posted: Wed Feb 03, 2010 5:43 am Post subject: Using calc functions in OOO Basic |
|
|
I have this code
Code:
X = FuncAcc.callFunction("WORKDAY",ARRAY("2010/2/5",1,X)
X is as optional argument (not workdays to exclude from the calculation).
X should be a cellrange.
Is there a way to send the X as a array, instead of a cellrange?
Ex.: how to send ("2010/12/25";"2010/7/4") to X ?
Thanks _________________ BrOffice.org 3.2.1 |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Wed Feb 03, 2010 6:06 am Post subject: |
|
|
Hello
Sub Main
FuncAcc = createunoservice("com.sun.star.sheet.FunctionAccess")
x = FuncAcc.callFunction("WORKDAY",array(csng(date),3)
print cdate(x),date
End Sub
With thank to Sliderule
Romke |
|
| Back to top |
|
 |
eduzs OOo Advocate


Joined: 07 Feb 2005 Posts: 356 Location: RJ, BRAZIL
|
Posted: Wed Feb 03, 2010 6:42 am Post subject: |
|
|
Thanks, but this is not exactly what I an looking for.
This code you send will calculate 3 workdaus before date.
But after de ",3" there is a optional argument, like:
x = FuncAcc.callFunction("WORKDAY",array(csng(date),3, Y)
the question is how to send this Y to the function, cause it should be a cellrange. _________________ BrOffice.org 3.2.1 |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Wed Feb 03, 2010 7:47 am Post subject: |
|
|
Hello
I did see this question only as a third time post of the same question.
I don't know the answer on the other part of the question.
Romke |
|
| Back to top |
|
 |
|