Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
In LibreOffice forum I found this question discussed. Check this –  AurA Apr 17 '12 at 9:07

1 Answer 1

up vote 2 down vote accepted

It's possible to make Calc save formulas instead of values. You need to make sure that:

  1. on the Sheet, Formulas instead of the resulting values are displayed, and

  2. the CSV Export filter is set to save cell content "as shown".

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:

Calc 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 File -> Save as..., and mark the checkbox Edit filter settings:

save as

After clicking Save, the dialogue to edit the filter settings will appear:

edit filter settings

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.