I’ve written a Python script which geocodes a location.
I would like to execute this on a cell (e.g. K2) and write back the result to K1 (latitude) and K2 (longitude).
Sub test
oSheet=ThisComponent.CurrentController.ActiveSheet
Cell = oSheet.GetCellRangeByName("K183")
v = Cell.getString
x = Shell ("python /work/mapping/calc-lati.py" & v)
MsgBox x
End Sub
I’m always getting back “0”, so that’s probably the exit code for success. But how can I really get the cli output of my script?