We are trying to port some tools from Excel/VBA into Libre office - or rather at the moment testing if it’s feasible.
We use(d) excel to control many programmes that need to run in order using commands like:
Shell sbat, vbMinimizedNoFocus
where sbat would be something like:
sbat = "c:\something\program.bat arg1 arg2 arg3"
or
sbat = “c:\anaconda\python.exe c:\something\my_file.py arg1 arg2 arg3”
Using the shell command in libreoffice doesn’t work for us.
For a brief time I found the following appears to work:
Dim objExec As Object
objExec = createUnoService("com.sun.star.system.SystemShellExecute")
objExec.execute("C:\Anaconda\python.exe", "C:\dummy\out\temp.py", 0)
This appeared to replicate the VBA command:
shell “c:\anaconda\python.exe C:\dummy\out\temp.py”, vbMinimizedNoFocus
It worked briefly on my computer - however when I tried it again a week later, it failed. We tried it on other colleagues computers and it also didn’t work for them.
So far it seems there is no reliable way to use a ‘shell’ command in Libre Office and hence we have stopped migration into Libre. I would welcome any answers explaining how to make it work.