Hi,
Since the last update (security update on the WEBSERVICE function), I cannot use it within a macro like I used to.
The following macro was working nicely prior to the update and I get now an “Illegal Argument” exception. If I try manually to call WEBSERVICE with the built URL, it works…
Any hint?
Sub CallWS
dim currentCell
dim currentRow
dim currentSheet
currentSheet = ThisComponent.getCurrentController().getActiveSheet()
currentCell = ThisComponent.getCurrentSelection()
currentRow = currentCell.CellAddress.Row()
dim RowDate as string
dim RowCredit as string
dim RowDebit as string
dim RowNature as string
RowDate = currentSheet.getCellByPosition(0,currentRow).getString()
RowNature = currentSheet.getCellByPosition(1,currentRow).getString()
RowDebit = currentSheet.getCellByPosition(4,currentRow).getValue()
RowCredit = currentSheet.getCellByPosition(5,currentRow).getValue()
svc = createUnoService("com.sun.star.sheet.FunctionAccess")
dim ss as string
ss = "https://#hostname#/?date="+RowDate+"&credit="+RowCredit+"&debit="+RowDebit+"&nature="+RowNature
A = svc.callFunction("WEBSERVICE",Array(ss))
currentSheet.getCellByPosition(2,currentRow).setString(A)
End Sub
In case this helps:
Version: 6.0.1.1
Build ID: 1:6.0.1-1
Threads CPU : 4; OS : Linux 4.9; UI Render : par défaut; VCL: gtk2;
Locale : fr-FR (fr_FR.utf8); Calc: group