For example "22.6543257567869"->"22.65"
I think it can be done like this:
Code: Select all
outputvalue=CDbl(CInt(inputvalue*100))/100
Code: Select all
outputvalue=CDbl(CInt(inputvalue*100))/100
Code: Select all
fc=createUnoService("com.sun.star.sheet.FunctionAccess")
msgbox fc.callFunction("Round",Array(22.6543257567869,2))
Code: Select all
Function Round(val As Double,digits_after_point As Integer) As Double
Round = CDbl(CLng(val*(10^digits_after_point)))/(10^digits_after_point)
End Function