Thanks for the many hints guys. Sadly no luck with this by now...
I need to convert csv to xls because I need an export function which could Just Work for a customer of ours. They expect a file to be loaded in their system to be an xls, so...
Anyway, I have tried redirecting standard error (and everything else) using &> /dev/null at the end of the command, but didn't work out (same error).
Catching the exec and ispecting its output shows a CHILDSTATUS error, but this we knew already.
I have also thought it could be a matter of different current folder, so I changed the command to
/usr/bin/libreoffice --headless --convert-to xls /tmp/fileugDbjI.csv --outdir /tmp
to force output folder to be /tmp. As before, the command works fine in the shell (return code is 0)
Using exec to invoke a shell as Neophytos suggested brings to the very same behaviour.
I am out of clues... think I will try to reproduce the problem on another server to see if it is due to this particular machine/configuration or if there is something going wrong with the proxy