Saving CSV files with password

I tried to save a text csv file in calc, with a password. The programme provides the usual option boxes, save with password, encrypt etc, but does not allow me to select any of these options. . This seems to apply to all text files. Any ideas why

I could imagine that LibreOffice only feels responsible for the encryption of files in odf formats.
If I had the problem, I would temporarily cache the csv file, then save it with 7zip in an encrypted archive and destroy the unencrypted file.
You can then open the file directly from the archive with LibO, for what you must of course specify the key.

csv is raw data in plain text. It is not even a file format because there are thousands of different csv formats out in the wild, which is the reason why Calc shows a complex import dialog in order to allow importing raw text data correctly.
Computer programs such as gpg or pgp can encrypt and decrypt all kinds of data, including csv files.
A zip archive can also be password protected.
Your operating system may provide some way to encrypt some partition or the entire drive, so it is only readable and writable on your personal devices where you have the right software and keys.

Thank you. That helps. I am averse to complication so I think I will simply store the file on a USB stick!

Encryption is complicated in any case because it requires responsible management of software, data, keys and passwords.
A Linux system makes all these difficult things a lot easier.

Why csv anyway? I would never save any spreadsheet as csv. Csv makes sense as a low level exchange format, i.e. when the file is just a temporary transfer medium and you have no idea who will load the data using which software.

Just save your spreadsheet as encrypted ods and make very, very sure to keep the password safe and warm. LibreOffice takes care of the contained data and the encryption algorithm. In the future, when encryption algorithms change for good reasons, you may need to decrypt the file with an old version of LibreOffice and encrypt it again with a then recent version.

Even if LibreOffice ceased to exist, it will be possible to read the encryption details from the unencrypted metadata and use 3-party software to decrypt the encrypted parts, given that you can provide the password.

Storing data on USB sticks is a well known method to lose all data on that stick unless you follow certain protocols strictly and patiently: Apache OpenOffice Community Forum - Using a USB stick with OpenOffice.org and its Derivatives - (View topic)

1 Like

Because I am an old & simple fellow and don’t want a problem when I need to export the data into another app that requires csv files, which I might have to do. And I can hide a USB stick around the house, it is like writing your passwords down on a piece of paper and hiding them in a book.

There is no standard, so while it would be possible to create some encrypted file wich contains a csv nothing but LibreOffice will read it. And then you could just use an encrypted .ods
.
You could file a request for enhancement to add something like the suggestion of Lupp to the export options, but today I would use veracrypt containers, for direct storage or the various options from gpg or mcrypt on the command-line.

Thank you.