I found this for the opposite conversion Convert xlsx to text CSV via command line only on Linux But I have absolutely no understanding of that line of code. Can anyone tell me how to convert from a csv to a xlsx from the CLI? Thanks in advance for any help.
Maybe you can try unoconv, which uses libreoffice as backend. It can convert between formats really easily:
unoconv -f xls myfile.csv
Sadly it does not support xlsx on Fedora, but supports ooxml - Microsoft Excel 2003 XML [.xml]