Import a CSV without losing data
Choose delimiter, encoding and column types before a spreadsheet changes identifiers or dates.
Follow the method ↓
The answer in 30 seconds
A CSV is text arranged as rows and fields. A spreadsheet may guess a separator, date or number incorrectly: an identifier such as 00127 can silently become 127.
Keep the original file, open an import preview, select its delimiter and encoding, and set identifiers to text before loading. Compare row counts and sample values afterward.
Examples to adapt
Reopen the original with the delimiter actually used by the file.
Check the file's character encoding before saving changes.
Import the column as text from the original; display formatting alone may not restore the value.
Follow the method
- 1Preserve the source
Make a working copy and note where the CSV came from and when it was downloaded.
- 2Open the import preview
Use the spreadsheet's text or CSV import tool instead of immediately saving a guessed conversion.
- 3Set delimiter and encoding
Check whether commas, semicolons or tabs produce the expected columns, and read accented characters.
- 4Set column types
Keep identifiers and period codes as text when their exact characters matter.
- 5Verify the result
Compare row count, headings and a few original values; save working formulas in a spreadsheet format, not CSV.
Workshop: preserve an identifier during import
Keep a copy of the original CSV and inspect its first lines in a text editor. Identify the delimiter, encoding and a column with leading zeroes or long identifiers. Set that column to text during import and verify sample values afterwards.
A spreadsheet can silently convert dates, numbers or identifiers. Compare the row count and export only after confirming the values survived.
A closer look
Check three cells before working
Fictional sample: identifier 00123, measurement 12,50 and date 04/05/2026. Use the file documentation to choose a type for each column before importing.
| Original text | Opening risk | Useful check |
|---|---|---|
| 00123 | Conversion to 123 | Import the identifier as text and verify all five characters |
| 12,50 | Split into two fields if comma is the field delimiter | Check field delimiter and decimal separator together |
| 04/05/2026 | 4 May or 5 April depending on convention | Confirm the convention before converting the column |
Formatting after a character has been lost does not automatically restore the original. Import again from an intact copy when necessary.
Does a neatly aligned table prove the import succeeded?
No. Compare sample identifiers, accented characters, decimals and dates with the original text. Also check the row count and a value near the end of the file.
Supporting documentation : Microsoft — Keeping leading zeros and large numbers · Consulted on 2026-10-15. Examples and calculations are illustrative.
A checklist to keep
Use these checks to record what you found. The grid supports a decision; it does not make one for you.
| Check | What to examine | Action |
|---|---|---|
| Original | Is an untouched copy available? | Keep |
| Delimiter | Do fields split into the expected columns? | Choose |
| Encoding | Are accents readable? | Check |
| Types | Are IDs and periods unchanged? | Set |
| Rows | Does the record count match? | Compare |
Read the checklist directly in the table.
What to check
A cell's display format can differ from its stored value.
A successful import preserves rows and identifiers.
CSV does not store multiple sheets or spreadsheet formatting.
Common questions
Why does my CSV use semicolons?
Separators vary by producer and regional setting. Use the preview to choose the one that restores the intended fields.
Can I recover lost leading zeros?
Return to the original if available. Adding zeros by guess can create incorrect identifiers.
Sources and documentation
Documentation consulted on . Examples are illustrative; interfaces and results may change.
Reference record for this resource
Identify the publisher, official destination and practical checks before using the service.
Read the LibreOffice record →