It seems to be an undocumented/unsupported feature, but if you open a csv (comma separated spreadsheet) with Libreoffice, it will calculate formulas that start with = in the text file. Unfortunately I don't see a way to keep the formulas when saving back to csv, it simply writes the numbers. Is there some option to keep formulas?
It's possible to make Calc save formulas instead of values. You need to make sure that:
With these settings, Calc will not only show the formula, but it will put the formula as plain text in the CSV export. The next time you open the sheet, Calc will recognize the formula and calculate its result.
1. Show Formulas instead of Values
To display the formulas instead of their result values on the sheet, you need to check the display settings in Calc'c "View" options:
2. CSV Export Filter Settings
By default, the CSV export filter settings are set to export cell content as shown on the sheet. So, if displaying formulas is activated (as explained above), it will export the formula by default. But it will not work if exporting content as shown is deactivated. You can check / modify this setting when saving a CSV.
To do so, select Menu