LibreOffice Calc · CSV import · Beginner
Fix CSV Files Opening in One Column in LibreOffice Calc
Choose the right CSV delimiter in LibreOffice Calc, fix files opening in one column, and check quoted commas before importing.
Documentation checked; formula checks recorded separately · Editorial standards
A CSV file can open as one very long column in LibreOffice Calc even though the original text has several fields. Usually Calc is using the wrong field separator. Fix it in the Text Import dialog before making changes to the source file.
Find the separator in the source
Open the CSV in a plain-text editor. Here is a comma-separated example:
item,quantity,price
Pencils,12,2.50
"Paper, ruled",3,4.25
The first row names three fields. Notice the quoted comma inside "Paper, ruled": it belongs to the description and must not start a new field. A semicolon-separated file uses ; between fields; tab-separated files use tab characters.
Import correctly in Calc
- Choose File → Open and select your CSV file.
- If you do not see Text Import, choose Text CSV as the file type or enable Edit filter settings in the file-open dialog.
- Under the separator settings, choose Separated by and enable only the delimiter that the file actually uses.
- Confirm the Text delimiter (usually double quotation marks) to protect separators inside quoted fields.
- Examine the preview. You should see separate
item,quantityandpricecolumns, not one long field. - Click OK. Save a separate
.odscopy if you plan to edit, format or add formulas.
| Source line | Expected values after import |
|---|---|
Pencils,12,2.50 |
A2 Pencils; B2 12; C2 2.50 |
"Paper, ruled",3,4.25 |
A3 Paper, ruled; B3 3; C3 4.25 |
Download and try the CSV practice file.
Import a fixed-width text file instead
A report with fields at consistent character positions is fixed-width text, not separated CSV. Spaces inside a description are data; choosing Space as the separator would split the description as well. Keep using Separated by for the comma example above.
Scope: The fixed-width controls below are documented in the desktop Calc Guide 26.2 and LibreOffice Help labelled 26.8, checked on 23 October 2026. Windows, Linux and macOS dialog layouts can differ. The original fixture’s bytes, field boundaries and expected arithmetic were independently checked; this is not a native Calc import or save/reopen test.
Practice with exact field boundaries
Download the original fixed-width stock practice file. It contains a header and three fictional records, ASCII text (also valid UTF-8), ordinary spaces, no tabs and LF line endings. Each line contains exactly 26 characters before the line ending. Use the download rather than retyping the spaces.
ID Description QtyPrice
00007Blue pens 012002.50
00042Ruled paper 003004.25
00310Binder A 002010.00
| Field | Character positions, counting from 1 | Width | Preview column type |
|---|---|---|---|
| ID | 1–5 | 5 | Text |
| Description | 6–17 | 12 | Text |
| Qty | 18–20 | 3 | Standard |
| Price | 21–26 | 6 | Standard |
For this ASCII-only fixture, those character positions are also byte positions. Do not assume that equivalence for accented or other multi-byte UTF-8 text. The line ending is not part of a field.
- In Calc, choose File → Open, select the downloaded
.txtfile and explicitly choose Text CSV as the file type. This uses the text importer even though the filename is not.csv. - Set Character set to Unicode (UTF-8), Language to English (USA) and From row to 1 so the header occupies spreadsheet row 1.
- Choose Fixed width. In the preview ruler, place boundaries after character 5, after 17 and after 20, giving widths 5, 12, 3 and 6. These are cumulative character counts, not spreadsheet column widths. Before continuing, the first record must split as
00007 | Blue pens | 012 | 002.50; the bars here illustrate cuts and are not in the file. - Click each preview column and set Column type using the table above. Making the ID column Text protects its zeros; making Qty and Price Text would prevent ordinary numeric calculations. English (USA) supplies the decimal-point interpretation for Standard. Alternatively, the US English column type can interpret numeric columns independently of the dialog’s language.
- Leave Detect special numbers off. Ordinary decimal conversion still occurs: this checkbox is not a switch that makes all numbers text. If present, leave Detect scientific notation and Evaluate formulas off too; the fixture needs neither. Inspect all three records before choosing OK.
The documented controls are described in Text Import Help and Calc Guide 26.2, Chapter 1, “Opening a CSV file”. For this exercise, trailing description padding is harmless; the checks below use TRIM so they do not depend on whether that padding was removed during import.
Check text, numbers and totals before editing
Expected values with the header in row 1:
| Row | A: ID text | B: description, ignoring trailing spaces | C: numeric quantity | D: numeric price |
|---|---|---|---|---|
| 2 | 00007 |
Blue pens | 12 | 2.5 |
| 3 | 00042 |
Ruled paper | 3 | 4.25 |
| 4 | 00310 |
Binder A | 2 | 10 |
A numeric 2.5 may display as 2.50 after number formatting; neither display should be mistaken for text 002.50. In unused cells, check =ISTEXT(A2) and =LEN(A2) (TRUE and 5), =TRIM(B2) (Blue pens), and =ISNUMBER(C2) and =ISNUMBER(D2) (both TRUE). Repeat the type checks for rows 3 and 4. These expected checks assume English function names.
Enter =C2*D2 in E2 and fill down through E4: expected line amounts are 30, 12.75 and 20. Then =SUM(C2:C4) should return 17, and =SUM(E2:E4) should return 62.75. These results were independently calculated from the fixture, not captured from Calc. Save the working spreadsheet separately as ODS; do not overwrite the raw text fixture with the formulas.
Fix a shifted boundary or wrong type
- One character appears in the next field: cancel and reimport the untouched file. Check the cumulative cuts 5/17/20 against every record, not just the header. A cut after 4 would split
00007, so stop before importing if the ID is not five characters. - Blue and pens become separate columns: the file was treated as space-separated instead of fixed-width. Switching delimiters cannot repair a missing or extra character in the source.
- IDs are 7, 42 and 310: reimport with the first column set to Text. Formatting already-converted numbers as text does not recover their original zero-prefixed strings.
- Numbers look right but totals fail: check the preview types and numeric import language, then verify with ISNUMBER. Decimal points in this fixture require the English (USA) interpretation; other source files may require a different language.
- Later records no longer align: inspect the raw file for tabs, altered spaces or different record layouts. Do not compensate for one bad row by moving every boundary. This exercise covers one consistent layout, not mixed-width report parsing.
If the preview still looks wrong
- Everything stays in A: the delimiter doesn’t match the original text. Inspect the file in a text editor.
- Descriptions split at their commas: check the text delimiter and whether the source has properly balanced quotes.
- Accents look like
é: that’s an encoding issue, not a field separator issue. See fix CSV encoding. - Codes lose zeros or become dates: make their preview columns Text, then follow preserve leading zeros.
What CSV cannot preserve
CSV is a text interchange format. It does not retain all workbook features, such as multiple sheets, layout, or normal spreadsheet formulas. Make an ODS copy after importing if you need those features; keep the raw CSV as your reference.
Common questions
Should I edit the CSV to replace all semicolons with commas? Usually no. A legitimate field can contain that character. Match Calc’s import settings to the file instead.
Why does opening the same CSV sometimes show a different dialog? Calc can reuse recent import settings. Enable Edit filter settings if you need to inspect or override them.
Official reference: LibreOffice Help. This tutorial focuses on LibreOffice Calc; menu names and behavior can vary by version, operating system and locale.