I'm too late to help Antonio, but for posterity...
You can call spreadsheet functions from Basic, as explained in the open office docs. Here's a simple example that invokes the WEBSERVICE()
function:
Function GetWebContent(url As string) As String
On Error GoTo ErrorHandler
Dim funtionAccess As Object
functionAccess = createUnoService("com.sun.star.sheet.FunctionAccess")
GetWebContent = functionAccess.callFunction("WEBSERVICE",Array(url))
Exit Function
ErrorHandler:
GetWebContent = "Error " & Err
End Function
Function Test
Dim url As String
url = "http://www.google.com"
Dim response As String
response = GetWebContent(url)
End Function