Convert ODS to CSV: What Survives, What Is Lost, and When It Fits
A practical review of converting ODS spreadsheets to CSV: what the conversion changes, what it drops, encoding and delimiter pitfalls, and when to keep the original.
Converting an ODS spreadsheet to CSV is one of the most common ways to move data out of LibreOffice Calc or another OpenDocument application and into a database, script, mailing tool or another spreadsheet program. The conversion is simple in principle but lossy by design. This review explains what changes, what you give up, and how to tell whether the resulting file will still serve its purpose once it reaches its destination.
Is converting ODS to CSV suitable for your use?
CSV is a good choice when the destination only needs the data in one table: rows, columns and cell values. Its main benefit is reach. Almost any tool that handles tabular data can read a delimited text file, and the file can be inspected or edited in a plain text editor.
The decisive tradeoff is that CSV holds one sheet of values and nothing else. Formulas, formatting, multiple sheets, charts, comments and cell types do not survive as such. If the recipient needs to keep working with the spreadsheet as a spreadsheet, keep the ODS file and share it alongside or instead of the CSV.
- CSV is usually the better fit when:
- the data is being imported into a database, script, analytics tool or web service
- only one sheet matters and its values are final
- you want a format that can be diffed, version-controlled or read without spreadsheet software
- Keeping the ODS file is usually the better fit when:
- the workbook has several sheets that belong together
- formulas need to stay live and editable
- layout, merged cells, colors or number formats carry meaning for the reader
- the recipient will continue editing in a spreadsheet application
What the conversion actually changes
An ODS file is a compressed package of XML documents that describe sheets, cell contents, formulas, styles and embedded objects. A CSV file is plain text: each line is a row, and cell values are separated by a delimiter, most often a comma. Converting from ODS to CSV is therefore a change in what is stored, not just in how it looks. The converter reads each cell of one sheet, writes out a text value, and discards everything that has no place in delimited text.
This is different from changing a font or display style. Nothing about the CSV file controls how it will be shown; the application that opens it decides column widths, number display and whether a value looks like a date. That is why the same CSV can appear differently in two programs even though the stored characters are identical.
| Element | In the ODS file | In the resulting CSV |
| Cell values | Stored with a type (number, text, date, etc.) | Written as text; type information is not stored |
| Formulas | Stored and recalculated | Only the last calculated result is written |
| Multiple sheets | Supported | One sheet per CSV file |
| Formatting, colors, fonts | Stored as styles | Dropped |
| Merged cells | Supported | Value usually appears in one cell; the merge is lost |
| Charts, images, comments | Supported | Dropped |
| Number display (currency, decimals, thousands separators) | Stored as a format | Either the raw value or the displayed text, depending on export settings |
The last row matters more than it looks. LibreOffice Calc's CSV export offers an option to save cell content as shown. With it enabled, a value displayed as a rounded currency amount is written as that rounded text; with it disabled, the underlying value is written. Neither choice is universally right, so decide based on whether the destination needs exact numbers or human-readable figures.
Delimiters and quoting are the other mechanical change. A cell that contains the delimiter, a line break or a double quote must be wrapped in quotes, and any double quote inside it is doubled. The convention described in RFC 4180, which most tools follow, looks like this:
Cell A1: Smith, "Jr"
Cell B1: 42
CSV row: "Smith, ""Jr""",42
If a converter skips this quoting, the comma inside the name will split it into two columns when the file is read back. Checking a few rows that contain commas, quotes or line breaks is the quickest way to judge a converter's output.
Will the CSV stay readable and usable after sharing?
Because CSV carries no metadata about itself, most problems appear at the receiving end rather than during conversion. The points below are general behaviors of delimited text; how a specific destination handles them should be confirmed with that destination's documentation or a small test file.
- Character encoding: CSV does not declare its encoding. Exporting as UTF-8 is the safest default for names and text outside basic English, but some applications guess the encoding from system settings and may display accented or non-Latin characters incorrectly. Test with a row that contains such characters.
- Delimiter and locale: in regions where the comma is the decimal separator, semicolons are often used as the field delimiter instead. A file written with one convention and opened under the other can collapse into a single column or split numbers in half.
- Reinterpretation of values: when a CSV is opened in a spreadsheet program, the program may convert values it recognizes. Leading zeros in ZIP codes or IDs can disappear, long numbers can be shown in scientific notation, and text that looks like a date can be turned into one. Importing with columns explicitly set to text avoids this.
- Formula-like text: values beginning with characters such as =, +, - or @ may be treated as formulas when the CSV is opened in a spreadsheet. If the data comes from untrusted sources, this can be a security concern and is worth reviewing before sharing.
- Line breaks inside cells: multi-line cell content is valid when properly quoted, but simple line-by-line tools may still break such rows apart.
For accessibility, a CSV file opened in a spreadsheet application inherits that application's table navigation, which is generally workable for screen reader users. Opened as raw text, it is read as a stream of values and delimiters, with no column headers announced, which is hard to follow for anything beyond a few columns. If people rather than programs will read the data, a properly structured spreadsheet or an accessible table in a document is usually a better deliverable. This review did not test specific assistive technologies, so treat this as a general expectation rather than a verified result.
Practical ways to convert
In LibreOffice Calc, use Save As or Export, choose the Text CSV format, and enable the option to edit filter settings. That dialog lets you set the character set, field delimiter, string delimiter and whether to save content as shown. Only the active sheet is exported by default, so switch to the sheet you need first or repeat the export for each sheet.
For batch work, LibreOffice can convert from the command line without opening a window. The filter options in the second example request a comma delimiter, double-quote string delimiter and UTF-8 encoding; check the documentation for your installed version, since available options can change between releases.
soffice --headless --convert-to csv input.ods
soffice --headless --convert-to csv:"Text - txt - csv (StarCalc)":44,34,76 input.ods
Scripted conversion is also possible. In Python, the pandas library can read ODS files when the odfpy package is installed, and then write CSV with an explicit encoding. This gives control over which sheet is read and how columns are typed, which helps preserve leading zeros and identifiers.
import pandas as pd
df = pd.read_excel("input.ods", engine="odf", sheet_name=0, dtype=str)
df.to_csv("output.csv", index=False, encoding="utf-8")
Online ODS to CSV converters are convenient for one-off files, but uploading a spreadsheet sends its contents to a third party. Do not assume how long a service keeps files or who can access them based on its design or wording; read its stated privacy policy, and avoid uploading personal, financial or confidential data unless that policy is acceptable for your situation. Local conversion avoids the question entirely.
A quick check before you rely on the file
- Open the CSV in a plain text editor and confirm the delimiter, quoting and encoding look as expected.
- Compare the row and column count with the source sheet.
- Spot-check rows with commas, quotes, line breaks, accented characters, leading zeros and dates.
- Import a copy into the actual destination and confirm values arrive unchanged.
- If the workbook had several sheets, confirm each needed sheet has its own CSV.
Gaps in this review
No specific converter, version or destination application was tested for this article, and no measurements of speed, accuracy or file size are reported. The behaviors described are general properties of the ODS and CSV formats and documented options in common tools. Results in a particular program, especially around encoding detection and value reinterpretation, should be verified with a small sample before converting important data.