CSV is a plain-text format for storing rows of data, while Excel is spreadsheet software that can store data, formulas, formatting, charts, and multiple worksheets in workbook files such as XLSX. Choose CSV when you need a simple, portable data table; choose an Excel workbook when you need spreadsheet features or want to preserve how the data is organized and calculated.
What CSV and Excel mean
CSV stands for comma-separated values. It is a type of text file, commonly saved with the .csv extension. Excel, by contrast, is an application made by Microsoft. People often say “an Excel file” to mean a workbook saved in a format such as .xlsx or .xlsm, but Excel can open and save several kinds of files, including CSV.
This distinction explains a frequent source of confusion: a CSV file can be opened in Excel, but that does not make it an Excel workbook. A CSV opened in Excel is still fundamentally a text-based table. It does not acquire the workbook’s formatting, formulas, or multiple-sheet structure unless you save it in a workbook format.
Excel workbooks may use different extensions. XLSX is the standard macro-free workbook format; XLSM supports VBA macros; XLSB is a binary workbook format. CSV is a separate, simpler format. The right choice depends on what you need the file to contain and which programs or systems must read it.
How CSV stores data
A CSV file represents a table as lines of text. Each line usually corresponds to a row, and commas separate the fields in that row. For example, a small file might look like this:
Product,Quantity,Price
Notebook,3,4.50
Pen,10,1.25
That text can be read by a person, a text editor, a programming language, or a spreadsheet application. CSV does not, by itself, declare that 4.50 is a currency value or that 3 is a quantity. It simply records characters separated according to a convention. The program opening the file decides how to interpret those characters.
Commas inside a field need special handling. In common CSV conventions, a field containing a comma is enclosed in double quotation marks, and a quotation mark inside a quoted field is doubled. A field can also contain a line break when it is quoted. These rules mean that not every comma or line break necessarily separates a new field or row. CSV variants differ, however, and a file may use a semicolon or tab as its delimiter instead of a comma.
There is no single universal CSV standard that every program follows identically. RFC 4180 describes a widely used format, but real files can differ in delimiters, character encoding, quotation rules, and line endings. UTF-8 is common for text encoding, but older or region-specific files may use another encoding. These differences matter when a file contains accented letters, non-Latin writing, or special symbols.
How Excel workbooks differ
An Excel workbook stores more than a grid of text. It can include several worksheets, cell formulas, number formats, colors, conditional formatting, charts, tables, data validation, comments, and other workbook features. Formulas can calculate results from other cells and recalculate when inputs change. A CSV file has no standard way to preserve that workbook structure.
Excel also assigns types and behavior to cells. A cell can contain a number, a date value, text, a formula, or another kind of content. Formatting can display a number as a percentage, date, or currency without changing the underlying value. For example, the numeric value 0.25 can be displayed as 25% in a formatted workbook. In CSV, the file records text characters, such as 0.25 or 25%, rather than a value plus a separate display format.
A worksheet in modern Excel is limited to 1,048,576 rows and 16,384 columns. CSV as a text format does not define those same worksheet limits, although the software importing a CSV will have its own practical limits. A very large text file may exceed what Excel can load into one worksheet, even if another data tool can process it.
What happens when Excel opens a CSV
When you open a CSV in Excel, Excel places the data into a worksheet and tries to interpret each field. Depending on how the file is opened and the import settings, it may recognize numbers and dates, or it may treat values as text. This automatic interpretation is convenient for ordinary data, but it can change how certain entries appear.
For instance, a product code such as 00127 may be displayed as 127 if Excel interprets it as a number. A value like 3/4 may be interpreted as a date in some regional settings, rather than as a fraction or code. Long digit strings can also be problematic: Excel preserves only 15 significant digits of numeric precision, so an account number or identifier with many digits should generally be imported as text rather than as a number.
For more control in Microsoft 365 for Windows, use Data > From Text/CSV to preview and import a file instead of relying on automatic opening. Review the delimiter and data preview, and set sensitive columns such as IDs, postal codes, or long codes to Text when appropriate. The exact import options can vary by Excel version and file source. Excel for Mac offers text-import options too, though its interface and available controls may differ.
Opening a CSV does not necessarily preserve the original file as a CSV if you later save it. Excel may prompt you to choose a format. If you save as CSV, the exported file contains data from the active worksheet, not every worksheet in the workbook. It also drops workbook-only features. Keep an XLSX copy if you need to retain the original workbook features.
What CSV keeps and loses
CSV is useful precisely because it keeps the representation simple. It can carry a rectangular set of rows and fields in a form that many database tools, programming languages, websites, and spreadsheet applications can exchange. That makes it suitable for exporting a contact list, transferring a product catalog, or supplying records to an application that accepts CSV.
When Excel saves a worksheet as CSV, it saves the current values rather than preserving formulas as working formulas. A cell containing a formula is exported as its calculated result, so the recipient cannot recalculate it from the original formula. The export also does not retain sheet names, cell formatting, charts, images, filters as interactive settings, or other workbook features. Typically, the active sheet is the one written to the CSV.
CSV also has no built-in place to store multiple worksheets, cell comments, column widths, or a workbook’s visual design. Some programs add conventions or metadata around a CSV, but those are not reliable replacements for the standard workbook features and may not be understood by another application. If the recipient needs to inspect calculations or see a formatted report, send an Excel workbook or a PDF as appropriate, rather than assuming CSV will preserve the presentation.
Compatibility, sharing, and automation
CSV’s broad compatibility is a major advantage. A simple CSV can be generated or read by many systems without requiring Microsoft Excel. It is also easy to inspect with a plain-text editor, compare in version-control tools, or process with scripts. For recurring data transfers, its straightforward structure can make CSV a practical interchange format.
That simplicity does not guarantee that every recipient will see identical results. One program may expect commas while another expects semicolons; one may assume UTF-8 while another guesses a different encoding. Regional settings can affect how spreadsheet software recognizes decimal marks and dates. For reliable exchanges, agree on the delimiter, encoding, column order, date representation, and treatment of blank values with the receiving system.
Excel workbooks are better for collaborative analysis when people need formulas, filters, charts, multiple tabs, or clear presentation. Microsoft 365 also supports sharing and co-authoring workbooks through supported cloud storage. But a workbook may be less convenient for a system that expects a plain table, and macro-enabled files may be blocked or restricted by an organization’s security settings.
Common mistakes and safety concerns
- Assuming CSV preserves formatting: It does not store Excel’s cell colors, number formats, or layout. Save a workbook copy before exporting if those details matter.
- Trusting automatic type detection: Check identifiers, dates, postal codes, and long numeric strings after import. Importing a column as text can prevent unwanted changes.
- Ignoring delimiters and encoding: If all data appears in one column, the delimiter may not match Excel’s expectation. If characters look corrupted, check the encoding and import settings.
- Opening untrusted CSV content without caution: Spreadsheet applications may interpret cells beginning with characters such as = as formulas. This can create a formula-injection risk when untrusted data is opened or later shared. Treat files from unknown sources cautiously and verify suspicious content.
- Overwriting the only workbook copy: Saving as CSV discards workbook features. Keep the original XLSX if you may need formulas, multiple sheets, or formatting later.
CSV files are not inherently safer simply because they are plain text. Text that looks harmless in a data export can be interpreted as a formula by spreadsheet software. Organizations that distribute user-supplied data should consider how spreadsheet programs will handle it, and recipients should avoid enabling or trusting unexpected content from unknown sources.
Which format should you choose?
Choose CSV when the job is to move a straightforward table between systems, when the recipient specifically requests it, or when you need a lightweight file that does not depend on workbook features. It is often a sensible export format for records such as names, dates, quantities, and codes, provided the receiving system’s expectations are understood.
Choose XLSX when the file needs formulas, more than one worksheet, formatted reports, charts, data validation, or ongoing analysis. Choose XLSM only when the workbook genuinely requires macros and the recipient can use them under their security policies. If the goal is to share a read-only visual report, PDF may be more appropriate than either format, though it is not a good substitute for data that needs to be sorted or analyzed.
Before sending a file, ask what the recipient needs to do with it. If they will import the rows into a database, CSV may be ideal. If they must update formulas or navigate multiple tabs, use an Excel workbook. If both uses matter, provide a clean CSV export for data exchange and retain or separately share the workbook that contains the analysis.
Frequently Asked Questions
Is CSV the same as Excel?
No. CSV is a text-file format for tabular data, while Excel is spreadsheet software. Excel can open CSV files, but a CSV does not contain the full features of an Excel workbook.
Can a CSV file have multiple sheets?
Not in the usual CSV format. A CSV represents one table, so saving an Excel workbook as CSV exports the active worksheet. To preserve multiple worksheets, save the file as an Excel workbook such as XLSX.
Does CSV save formulas?
No. When Excel exports a sheet as CSV, formula cells are saved as their current calculated values, not as reusable formulas. The exported data will not recalculate if someone changes an input.
Why does Excel remove leading zeros from a CSV?
Excel may interpret a value such as 00127 as a number and display it as 127. Import the column as text when the zeros are part of an identifier, or use a workbook format that preserves the intended data type and formatting.
Is CSV better than XLSX?
Neither is better for every task. CSV is usually better for simple data exchange and broad compatibility; XLSX is better when you need formulas, formatting, charts, or multiple worksheets.
Can I convert CSV to Excel?
Yes. Open or import the CSV in Excel, check that the columns and data types are correct, then save the file as an Excel workbook. The conversion can add workbook capabilities, but it cannot recover formatting or formulas that were never present in the CSV.
Related
- Excel Drop-Down Lists: How to Create and Manage Them
- How to Insert a Checkbox in Excel: Steps and Tips
- Change Text to Numbers in Excel: Easy, Reliable Methods
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Show Source Documents in Word Compare: Step-by-StepTo show the original and revised files alongside a Word comparison, run Review > Compare > Compare, select…
- How to Delete a Page in Word for the WebTo delete a page in Word for the web, remove the text, objects, or page or section break…
- Autofill in Excel From Another Cell: A Practical GuideTo autofill from another cell in Excel, select the cell you want to copy, then drag its fill…
- Excel Regression Analysis Output: What Each Statistic MeansExcel regression output summarizes how well a linear model fits your data and how each predictor relates to…
- How to Convert an Excel Workbook to Word DocumentsTo convert an Excel workbook to Word, choose what you need to preserve: copy a range as a…
- Excel: How to Hide Column Lines and Gridlines on a WorksheetTo hide the faint lines between columns and rows in Excel for Microsoft 365 on Windows, open the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.