How to open a .csv file
Comma-separated values · Text / spreadsheet
A .csv file is a plain-text table. Any spreadsheet opens it, but double-clicking it in Excel silently corrupts leading zeros, long numbers and dates. Import it instead of opening it.
What a .csv file actually is
CSV stores a table as text: one row per line, fields separated by commas, and quotes around any field that itself contains a comma. It is the lowest common denominator for moving data between systems, which is why every tool exports it.
The format has no type information. There is nothing in a CSV that says a column is text rather than a number, so the program reading it has to guess, and Excel guesses aggressively.
Why it will not open
CSV rarely refuses to open. It opens wrong. Product codes lose their leading zeros, long IDs turn into scientific notation, dates flip between day/month order, and accented characters turn into mojibake. The file is fine; the import was not.
Step by step
Windows
- 01Do not double-click the file if the data matters. Open Excel first with a blank workbook.
- 02Go to the Data tab, then "From Text/CSV".
- 03Select the file. In the preview, set File Origin to "65001: Unicode (UTF-8)" so accented characters survive.
- 04Click "Transform Data", set every ID or code column to type Text, then Close & Load. Leading zeros are now preserved.
- 05For a quick look without any of this, open it in LibreOffice Calc, which shows an import dialog by default.
macOS
- 01In Excel for Mac, use Data then "Get External Data", then "From Text", which gives the same import dialog.
- 02Numbers handles CSV more gently than Excel but still guesses column types.
- 03To see the raw file exactly as it is, open it in TextEdit or run "cat file.csv" in Terminal.
What usually goes wrong
Leading zeros disappear
A postcode of 01234 or a product code of 00789 becomes 1234 and 789 the moment Excel decides the column is numeric. Saving afterwards writes the damage back to disk permanently. Setting the column to Text during import is the only reliable prevention.
Long numbers become scientific notation
Any number over 15 digits, such as a credit card or a long order reference, loses precision because Excel stores it as a floating-point value. It will display as 1.23457E+17 and the original digits are gone, not hidden.
Not every CSV uses commas
Files exported in regions where the comma is the decimal separator often use semicolons. If everything lands in one column, change the delimiter in the import dialog to semicolon or tab.
Programs that open .csv
Our pick, in order. Every one links to the publisher's official download URL and the SHA-256 hash of the installer, so you can check the file before you run it.
- LibreOfficeLibreOffice is a free and powerful office suite, and a successor to OpenOffice.org (commonly known as OpenOffice). Its clean interface and feature-rich tools help you unleash your creativity and enhance your productivity.v26.2.5.2 · 3 hashed installers100
- ONLYOFFICE Desktop EditorsAll the tools you need to work with text documents, spreadsheets, presentations, and fillable forms on Windows, Linux, and macOS.v9.4.0 · 3 hashed installers95
- Sublime Text 4Sublime is a sophisticated cross-platform text editor for code, markup and prose.v4.0.0.420000 · 2 hashed installers92
Also registers .csv in its manifest
Taken straight from publisher manifests. Some of these handle the format for a narrow purpose rather than as their main job.
Common questions
- How do I open a CSV file in Excel without losing leading zeros?
- Do not double-click it. In Excel use Data, From Text/CSV, then Transform Data, set the affected columns to type Text, and load. Opening the file directly lets Excel infer types and strip the zeros before you can intervene.
- How do I open a CSV file without Excel?
- LibreOffice Calc and ONLYOFFICE both open CSV for free and show an import dialog that lets you set the delimiter, encoding and column types up front. Any text editor also shows the raw contents.
- Why does my CSV open with everything in one column?
- The file uses a delimiter your spreadsheet did not expect, usually a semicolon or a tab rather than a comma. Re-open it through the import dialog and pick the correct delimiter.
- Why are the accented characters wrong in my CSV?
- The file is UTF-8 but was read as a legacy codepage. Re-import it and set the file origin or character set to UTF-8, and the characters will render correctly.