it might be simple, but I don't know !!!
How I can calculate the string "3 + 5" ??
Excel has Application.Evaluate ("3 + 5")
MSScriptControl has ScriptControl.Eval ("3 + 5")
And OOo Calc ????
Thank you
| Edit: All links to oooforum.org are dead -- MrProgrammer, forum moderator |
Code: Select all
Function Eval(X As String) As Variant
Dim oCell As Object
oCell = ThisComponent.getSheets().getByIndex(0).getCellByPosition(10, 0)
oCell.formula = "=" & X
Eval = oCell.value
End Function
Thanks user lader, that worked!lader wrote:Code: Select all
Function Eval(X As String) As Variant Dim oCell As Object oCell = ThisComponent.getSheets().getByIndex(0).getCellByPosition(10, 0) oCell.formula = "=" & X Eval = oCell.value End Function