I have some csv files with too many columns for LibreOffice Calc to open, but only a few rows. If I can transpose the csv file, it should be ok as Calc can deal with very many more rows than columns.
I have some csv files with too many columns for LibreOffice Calc to open, but only a few rows. If I can transpose the csv file, it should be ok as Calc can deal with very many more rows than columns.
A simple python program would do the job (and since this is not really tested: backup you csv file in advance!):
You can save this into a file "my_csv_transposer.py" and call it from the commandline like this:
You can use this script from the shell like this:
And here is the script:
For reference's sake, here is the same incantation in Ruby: