Excel · File Formats & Data Exchange

CSV vs Excel is usually a comparison between CSV text files and Excel’s XLSX workbooks. CSV is a file format; Microsoft Excel is an application. A CSV stores tabular records as text, without native cell styles, chart objects, multiple worksheets, or functioning workbook formulas. XLSX can retain those features for editing and reporting. Choose CSV when another system needs a table of records, and XLSX when people need calculations, worksheets, or presentation. Neither is always smaller, faster, or safer. Before converting, check which features the recipient needs and how identifiers, dates, and numbers will be interpreted.

A customer ID such as 00123 can survive perfectly in a CSV, then lose its zeros when a spreadsheet imports it as a number. That distinction matters more than the icon beside the filename. This guide is part of AmriData’s Excel guides.

CSV vs Excel at a Glance

CSV files compared with modern XLSX workbooks
FeatureCSV (.csv)Excel workbook (.xlsx)
StorageDelimited plain textStructured, compressed workbook package
Typical purposeExchange tabular recordsCalculate, analyze, and present
Multiple worksheetsNo native supportYes
Cell formattingNo stored cell stylesFonts, colors, number formats, borders
Live formulasNo workbook formula objectsYes
Charts and imagesNot storedSupported
Data typesText fields interpreted on importTyped cell representations and formats
Tables, filters, PivotTablesCan supply their source recordsCan retain workbook features
Text-editor inspectionYesNot as an ordinary text document
CompatibilityBroad support; dialect and encoding matterRequires compatible spreadsheet software or libraries
File sizeDepends on text and record countDepends on content and compression
Grid limitsNo inherent worksheet gridExcel worksheet limits apply
AutomationCommon in scripts and import pipelinesPossible with workbook-aware libraries
VBA macrosNo native macro storageNot in XLSX; use a suitable format such as XLSM

These are format capabilities, not promises about every application. A spreadsheet program can add a chart after importing CSV, but the chart must be saved in a format that supports it. Likewise, an application that reads XLSX may not reproduce every advanced Excel feature.

CSV stores text records; XLSX can preserve worksheets, formulas, styles, and charts.
Choose the format according to what the recipient needs to retain.

The Same Sales Data in CSV and Excel

Here are three fictional orders. The revenue total is 371.25. Order IDs are labels, so their leading zeros matter.

CSV: the stored text

order_id,customer,revenue
00123,Alice,125.50
00124,Bob,95.00
00125,Carol,150.75

The first record names the columns. Commas separate fields, and the next three records hold the data. Nothing in the file declares a currency or tells Excel to treat order_id as text.

XLSX: a worksheet view

Illustrative worksheet, with revenue displayed in dollars
order_idcustomerrevenue
00123Alice$125.50
00124Bob$95.00
00125Carol$150.75
Total: =SUM(C2:C4)$371.25

The workbook can store text IDs, numeric revenue, a currency display, bold headings, and a formula that recalculates when an order changes.

If you export this worksheet to CSV, its total normally becomes a displayed value rather than a working calculation. Any chart disappears, and other worksheets are not included. Exact numeric text can depend on cell display and export settings; inspect the resulting file before importing it elsewhere. The raw CSV above intentionally excludes the total row so a receiving system cannot count it as another sale.

Which Format Should You Choose?

Your taskUsual choiceWhy
Import orders into a database or CRMCSVA consistent table fits many import workflows
Send a monthly report with chartsXLSXPreserves presentation and calculations
Share raw research observationsCSV plus a data dictionaryDocuments fields without requiring Excel
Maintain a budget with changing assumptionsXLSXFormulas can recalculate
Deliver several related worksheetsXLSXKeeps the workbook together
Process records in Python or SQLOften CSVConvenient when workbook features are unnecessary
Process data beyond a worksheet’s capacityCSV with suitable tooling, or another analytical formatThe processing engine matters as much as the file

What Is a CSV File?

CSV means comma-separated values. It represents records using text fields and delimiters. A header is common but not compulsory. CSV does not carry a workbook’s sheet names, validation rules, embedded pictures, or layout. A filename ending in .csv also does not establish the meaning, units, or allowed values of its columns.

Real files need more care than splitting every line at each comma. In this example, the quotation marks keep each name and city together, producing two columns:

name,city
"Smith, John","New York, NY"

A literal quotation mark inside a quoted field is commonly doubled. A quoted field can also contain a line break:

id,comment
1,"She said ""Hello"""
2,"First line
Second line"

That second example contains two data records, although it uses three physical lines below the header. Use a CSV parser that understands quoting. RFC 4180 documents common CSV conventions as an informational RFC; real exports also use variants such as semicolon delimiters and different encodings.

CSV’s advantage is portability: you can inspect the text and send records between otherwise unrelated systems. Its disadvantage is the extra agreement required. Sender and recipient must agree on separators, encoding, column meanings, date conventions, and missing-value tokens. Keep those details with the dataset.

What Is an Excel Workbook?

Microsoft Excel is software for working with spreadsheets. XLSX is its common modern workbook format: an Office Open XML package containing compressed components for cells, worksheets, and related features. Open it in spreadsheet software or read it with a compatible library, rather than treating the whole file as plain text.

A workbook called Sales.xlsx might contain Orders, Customers, Monthly Summary, and Charts sheets. It can keep calculations and their presentation beside the source records. CSV exports would require separate files for those tables and would still omit the workbook’s relationships and chart objects.

Common file extensions
ExtensionMeaning
.csvDelimited text records
.xlsxModern workbook; does not store VBA macros
.xlsLegacy Excel workbook format
.xlsmMacro-enabled workbook format
.xlsbExcel binary workbook format
.tsvTab-separated text records

Choose the extension deliberately. Opening a CSV in Excel does not convert the original file into XLSX. Renaming its extension does not convert it either. Use an import followed by Save As in the required format. Microsoft’s supported file formats reference explains which workbook capabilities each format retains.

Formulas, Formatting, Data Types, and Charts

Formulas and recalculation

In XLSX, =SUM(C2:C4) can be a stored formula. Change Alice’s revenue and Excel can update the total. A CSV export generally carries the calculated display instead. That exported total is a snapshot; it will not update when someone changes another CSV field.

CSV can contain characters that resemble a formula. That is different from preserving a workbook’s calculation structure, although a spreadsheet may interpret those characters as a formula when importing. This distinction explains both why calculations are lost on export and why untrusted CSV still requires care.

Formatting and typed cells

An XLSX cell can hold a number and a separate display format. For example, a value of 0.15 may display as 15%. CSV does not retain that number-format rule. Check whether an export wrote a fraction, a percentage string, or some other displayed representation before performing calculations.

XLSX also supports strings, booleans, and other cell representations; dates commonly use numeric serial values with date formatting. Richer storage does not guarantee correct meaning. An ID already imported as a number remains wrong even after you save the workbook.

Charts, filters, and PivotTables

XLSX can preserve charts connected to cells, tables, filters, PivotTables, conditional formatting, and data validation. CSV can provide the source records for these features after import, but cannot store the feature objects themselves. Exporting a PivotTable’s visible cells produces a summary table, not a refreshable PivotTable with its underlying detail.

This is why a workbook is useful for a report someone must revise. If the recipient needs only underlying records, export the source table and document it. Sending a decorated summary instead may leave them without the observations needed to reproduce your analysis.

CSV vs XLSX: File Size, Performance, and Limits

Is CSV smaller?

Not always. CSV has little structural overhead, which helps with small plain tables. XLSX compresses workbook components, so repeated text in a larger table can make an XLSX smaller than its uncompressed CSV equivalent. Images, formatting, formulas, and extra worksheets can increase workbook size.

A fair comparison uses identical records and reports the sheet selection, encoding, export settings, and actual byte counts. A workbook with four sheets and a chart is not equivalent to a CSV containing only one sheet. No universal size ratio or speed benchmark is assumed here.

Is CSV faster?

CSV is convenient for streaming because a suitable parser can process records incrementally. XLSX requires workbook-aware processing. Yet elapsed time depends on the program, hardware, parser, compression, memory use, and operations performed. Reading a table and recalculating thousands of spreadsheet formulas are different workloads.

For a repeated workflow, test a representative file using the actual destination tool. Include validation time and memory use, not just the time needed to open it. A quick import that silently changes IDs is not a successful import.

How many rows can each hold?

A modern Excel worksheet has 1,048,576 rows and 16,384 columns, according to Microsoft’s specifications. A header occupies one of those rows. These are worksheet limits; CSV has no equivalent built-in grid.

CSV is still constrained by the tool processing it, available memory, storage, and field-size limits. Do not open a file larger than the grid and save the visible portion over your only original. Databases, Python, or supported Power Query and Data Model workflows can handle records without placing all of them in one worksheet. Availability and memory limits vary. For repeated large analytical workloads, a columnar format such as Parquet may be more suitable.

When to Use CSV and When to Use Excel

Use CSV for record exchange and automation

CSV often suits CRM exports, ecommerce orders, inventory feeds, research observations, and database imports. A predictable header and one record per observation let the receiving system map fields without interpreting a report layout. Keep titles, footnotes, and totals outside the machine-readable data table.

Python’s CSV module and libraries such as pandas can read CSV; workbook libraries can read XLSX too. In either workflow, explicitly choose text types for IDs and define missing values. SQL imports also need appropriate destination column types: account numbers belong in a text column even when every character is a digit.

Small CSV files can work well in version control because text differences are inspectable. Reordering thousands of rows makes those differences harder to review. Access control, sensitive records, and the repository’s size limits still need consideration.

Use XLSX for calculations and reports

Choose a workbook for a budget, expense tracker, sales summary, survey review, or KPI report that needs formulas and several worksheets. A colleague can update assumptions and review the resulting figures without rebuilding the report. The Excel data analysis guide covers the analysis workflow beyond choosing a format.

Excel’s weaknesses become visible when a workbook grows difficult to audit, refresh, or calculate. Worksheet capacity is only one constraint; complex formulas and repeated manual edits also create maintenance work. See Excel versus data analysis tools when deciding whether the workflow itself needs to change.

Power BI, sharing, and collaboration

Power BI supports CSV and Excel sources, but an imported dataset does not automatically reproduce an Excel report’s appearance or calculations. Choose a stable table, check types and refresh behavior, and keep the source location consistent. Moving a file can break a refresh even when its extension stays the same.

Collaboration depends on applications and services. Suitable Microsoft services support workbook coauthoring; CSV can be exchanged through shared folders or managed data pipelines. Neither extension by itself supplies permissions, conflict resolution, or a reliable approval process.

How to Convert CSV to Excel Without Changing IDs

For sensitive IDs or ambiguous dates, use a controlled import rather than relying on a double-click. The following workflow fits current desktop Excel versions with Power Query; ribbon labels and available connectors vary by platform and edition. Microsoft documents the text import and export workflow.

  1. Keep the original CSV unchanged and open a blank workbook.
  2. Choose Data → From Text/CSV, sometimes under Get Data → From File, and select the file.
  3. Check the preview’s delimiter and encoding. Names and accented characters should be readable, and headers should align with their fields.
  4. Choose Transform Data. Inspect any automatically added Changed Type step. Remove or edit an unsuitable conversion before it changes identifiers.
  5. Set ID, postal-code, phone, and long account-number columns to Text from the source representation. Parse real dates using the confirmed locale; leave uncertain dates as text.
  6. Load the result and compare record counts and representative values with the original.
  7. Save a separate file as Excel Workbook (.xlsx). Reopen it and confirm the preserved values.

Changing a damaged numeric column to Text afterward will not restore lost digits. Reimport from the untouched source. Newer Excel editions also offer automatic data conversion controls, but availability varies; check the settings rather than assuming they protect every import path.

Conversion creates a workbook container; it cannot recover formulas or styles that were never in the CSV. Add those features only after checking the imported records. If the records need cleaning, follow how to clean data in Excel as a separate step.

How to Convert Excel to CSV

  1. Save the original workbook in its existing workbook format.
  2. Select the worksheet containing the records you intend to export. Check for totals, extra headings, and unwanted columns.
  3. Choose File → Save As or Save a Copy, depending on your Excel version.
  4. Choose an appropriate CSV type. Use CSV UTF-8 when available and compatible with the receiving system.
  5. Give the CSV a separate filename. Read any feature-loss warning and confirm the intended sheet.
  6. Inspect the saved text, then import it using controlled types in the destination application. Verify records, IDs, dates, and totals.

Ordinary CSV export saves the active worksheet, not the complete workbook. Export other sheets separately if required. CSV also omits chart objects, styles, validation rules, and live workbook formulas. These omissions are expected limitations, not evidence that the file is corrupt.

Check the actual delimiter after export: regional settings can produce semicolon-separated output. UTF-8 handles a broad range of characters, but the receiving system must read it correctly. Agree on whether it accepts a byte-order mark and how it interprets decimal separators. Microsoft’s save-to-text guidance describes the format warnings.

Ordinary CSV export keeps the active sheet’s exported values, but omits workbook features.
CSV export keeps a table of values, not the complete working workbook.

Common Conversion Mistakes and How to Catch Them

RiskExampleCheck or correction
Leading zeros removed000456 becomes 456Import identifier fields as Text from the source
Long ID rounded12345678901234567890 becomes an inexact numberPreserve all digits as text; reimport if already altered
Ambiguous date parsed03/04/2026Confirm March 4 versus April 3 before conversion
Missing value changedA blank becomes zeroDefine missing tokens and preserve their meaning
Columns split incorrectly"Smith, John"Use a parser that respects quotes and delimiters
Characters misreadA name containing é becomes garbledMatch the reading and writing encodings
Workbook features lostOnly Orders survives a CSV exportKeep XLSX when sheets, charts, or formulas are required
Total counted as a recordExport includes a summary rowSeparate raw observations from report summaries

Excel’s numeric precision is limited to 15 significant digits. A 20-digit account ID should not be stored as a numeric measurement. A custom display format can show zeros before a number, but it is not a replacement for preserving the original identifier. See Microsoft’s guidance on leading zeros and large numbers.

Use a short validation record: original count, exported count, column names, ID examples, missing counts, and a known total. For the three-order example, check three records, three fields, IDs beginning 001, and revenue totaling 371.25. Equal totals alone are insufficient: two altered records can offset one another.

Record units, date conventions, and missing tokens in a data dictionary. AmriData’s Data Dictionary Generator provides a starting point for column documentation. Confirm business meanings yourself; software cannot infer whether a blank means “unknown” or “not applicable” from an empty field alone.

Importing order ID 00123 as text preserves its zeros; number inference can turn it into 123.
Choose the text type before conversion changes an identifier.

Is CSV Safer Than Excel?

Neither extension guarantees safety. CSV has no native macro container, but spreadsheet applications may treat formula-like fields as instructions. OWASP describes this as CSV or formula injection. Risk depends on the content, importing application, settings, and user actions.

Untrusted fields beginning with characters such as =, +, -, or @ deserve context-aware handling. Quoting a CSV field only protects its parsing structure; it does not reliably stop formula interpretation. Do not remove every minus sign indiscriminately, because legitimate negative measurements would change.

For exports containing user input, keep a raw source copy and apply a spreadsheet-safe export policy tested with the intended application. Inspect unfamiliar files as text where appropriate and avoid enabling unexpected content. XLSX cannot store VBA macros, while XLSM can; workbook links and other content still require scrutiny. Protect confidential records with suitable access controls regardless of the format.

CSV vs Excel: Frequently Asked Questions

Is CSV an Excel file?

It is a text file that Excel can open. Opening it does not change the original format; save as XLSX to retain workbook features.

Is CSV better than XLSX?

CSV usually suits a plain table being transferred between systems. XLSX suits a workbook people must calculate with, edit, or present. The recipient’s task decides.

Can CSV preserve formulas, charts, or multiple sheets?

It does not natively preserve these workbook objects. Formula-looking text may still be interpreted on import, and exported chart data can be used to rebuild a chart.

Why does CSV lose formatting?

The format has no structures for cell colors, fonts, borders, or number-format rules. Keep a workbook copy if those features matter.

Does CSV have a row limit?

CSV defines no worksheet grid. The program reading it can impose practical limits. Excel’s regular worksheet grid is limited even when the source is CSV.

Why are dates and leading zeros changed?

The importing application may infer number or date types. Preserve identifiers as text and specify the source date convention before conversion.

Can CSV store very large numbers?

It can hold their text digits. Whether those digits remain exact depends on the reader’s chosen type. Keep long identifiers as strings rather than numeric cells.

Is CSV always smaller or faster?

No. XLSX compression can reduce file size, while parsing and calculation costs depend on the workload. Compare equivalent data in your intended tool.

Which is better for Python, SQL, or Power BI?

CSV is convenient for plain records; XLSX is useful when the source is organized in worksheets. All three workflows require deliberate type handling and validation.

Why does my CSV use semicolons?

Some exports use regional list separators, especially where commas serve as decimal separators. Choose the delimiter that matches the file during import.

How do I preserve non-English characters?

Use an agreed encoding, commonly UTF-8, for both export and import. Check names containing accented characters after the round trip.

What is the difference between XLSX and XLSM?

XLSM can preserve VBA macro code. XLSX cannot. Use a suitable workbook format when macros are required, and review unfamiliar macro-enabled files carefully.

CSV vs Excel: The Practical Choice

Send CSV when the deliverable is a table another system needs to read. Send XLSX when the deliverable is a working spreadsheet with formulas, sheets, or presentation. Keep the original, convert a copy, and verify the information that is easiest to change accidentally: IDs, dates, precision, and missing values.

If you need both machine-readable records and an editable report, provide both formats with clear filenames and field definitions. A CSV export and its source workbook serve different readers; neither has to replace the other.

Sources and References

← Back to Excel guides