I know you can use libreoffice as a command line tool and one parameter to convert formats is --convert-to, I do not know of other programs.
However, I do not know how to make it work, what do I have to type with libreoffice or another program to convert from excel to calc or the other way round?