How can I automatically create a list of files and folders in a given folder in LibreOffice Calc ? I'd like it to have as much info as possible (size, name, folder hierarchy...) sorted in nice little cells. I'd rather not dump it to a file using ls and then trying to sort it manually: it creates an awful output.
Your best bet would be to use a scripting language (Ruby, Python, Perl etc.) to create a text file in CSV format with this data. Calc can import CSV text files as spreadsheets.
An example Ruby script to get you started:
Run this in the appropriate directory then open the file 'output.csv' with Calc. Use the following settings on the import: