How to Split One Column Into Multiple Columns in LibreOffice Calc

Split delimited text in an open Calc sheet while preserving empty fields, leading zeros, quoted commas, and values in neighboring columns.
Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.
Quick answer
Select the cells in one column, open Data → Text to Columns, and choose the character between fields. Calc writes the first field into the selected cell and the rest into cells to its right. If the next column contains values you need, make room before applying the split.
Give the split room to expand
Suppose column A holds warehouse records such as NW|00427|Blue and column B holds quantities. You want separate columns for the warehouse, item code, and color. Running the split in A would put item codes where your quantities are. Copy A2:A101 to F2:F101 and check that G and H are empty for all 100 rows. Leave additional space if a record might contain a fourth field.
Put your new headings in F1, G1, and H1. Select F2:F101 as a single block down one column, leaving the headings outside the selection. Use the untouched records in A to check the output later.
Tell Calc which character divides the fields
Open Data → Text to Columns. Choose Separated by, clear any preselected separators, then check Other and enter one vertical bar |. Inspect the preview. A color such as Deep Blue should remain one value. If it occupies two columns, check whether Space is selected.
| Original record | Warehouse | Item code | Color |
|---|---|---|---|
NW|00427|Deep Blue | NW | 00427 | Deep Blue |
SE||Black | SE | (empty) | Black |
Leave Merge delimiters off for these records. Two adjacent bars mark a missing item code. Merging them would slide Black into the item-code column and make an incomplete record look valid.
Protect quoted descriptions and numeric-looking codes
If your records use commas, select Comma instead of the vertical bar. For NW,00427,"Blue, matte", set String delimiter to a straight double quote. The preview should show three fields, the last containing Blue, matte. An unquoted comma inside a description can also mean a column break. Correct ambiguous records against the source before applying one rule to the entire list.
Click the item-code column in the preview and select Text under Column type. That keeps 00427 as an identifier. If you receive the original record as a file, you can also preserve leading zeros while opening the CSV.
Check the result against the original
Click OK. If Calc asks to overwrite existing data, cancel and inspect the destination. Compare the first and last records, one with a missing field, and one containing punctuation against column A. Check that Black is in H and the five-character item code still starts with two zeros. If a field shifted, undo the split and rerun it from the preserved source. Save the working sheet as ODS. If a supplier needs only the three split columns, copy them and their headings to a clean sheet before you export that sheet as a UTF-8 CSV.
LibreOffice’s Text to Columns instructions · Separator and field-type options
Comments
Read or join the discussion.