Ask Your Question

How do I export and import formulas to CSV? [closed]

asked 2014-11-18 11:55:05 +0200

Emrys57 gravatar image

updated 2020-08-18 22:24:31 +0200

Alex Kemp gravatar image

I'm using LibreOffice on a Mac running OS/X Yosemite. I'm trying to follow the instructions at because I have a PHP program creating a spreadsheet out of a server database. The PHP creates a CSV file and I want to import that into LibreOffice.

If the csv file says

"=hyperlink("""", ""BBC"")"

then libreoffice imports those cells as free text, not as formulae, independent of the setting of the libreoffice - preferences - calc - view - formulas checkbox. If I click in that free text and edit it by adding a space at the end and hitting return, it changes into a formula.

If I have a real formula in a spreadsheet giving a calculated value, the wiki page suggests that I can export the formula (as opposed to a computed value) to a csv file by setting the libreoffice - preferences - calc - view - formulas checkbox. When I do that, I can see the formulas in the cells on the screen in LibreOffice. Then when I export it to a CSV file, the CSV file contains:


and not the formula.

Is it possible to import formulas from, and export formulas to, a CSV file?

Are the instructions at incorrect?


edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-03-06 13:19:48.829572

2 Answers

Sort by » oldest newest most voted

answered 2014-11-18 12:35:20 +0200

Lupp gravatar image

updated 2014-11-18 12:51:14 +0200

You have to use 'Save As...', choose Text (CSV) as file type, confirm the format in the first popup and check 'Save cell formulae instead of calculated values' in the second popup.

If you don't want to save a complete file but rather to copy/paste formulae from a range into an existing text file: (Temporarily) choose 'Formulae' in the 'Display' section of the 'View' options for Calc. Copy your range and paste wherever you want.

edit flag offensive delete link more


Thanks! That does work.

Emrys57 gravatar imageEmrys57 ( 2014-11-18 15:55:02 +0200 )edit

answered 2014-11-18 12:08:42 +0200

Emrys57 gravatar image

Aha! On import, in the "Text import" popup that appears when I open the CSV file, I have to uncheck the Text Import - Other options - Quoted field as text checkbox. Then I can import formulas from CSV as formulas, not text. Importing plain text still seems to work.

But I still cannot export formulas to a CSV file.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-11-18 11:55:05 +0200

Seen: 4,954 times

Last updated: Nov 18 '14