Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A CSV file stores tabular data as plain text, with fields separated by a delimiter—often a comma. You can create one by exporting a spreadsheet or writing it with a CSV-aware program. The format is useful for moving data between applications, but it does not preserve spreadsheet formatting or multiple worksheets.

What a CSV file contains

CSV stands for comma-separated values. A typical file contains one record per row, with fields separated by commas. The first record may contain column names, but a header is optional; the sender and receiving application should agree whether the first row is data or field names.

CSV is plain text rather than a formatted spreadsheet workbook. RFC 4180, published in October 2005, describes a commonly used CSV format and registers the text/csv media type. It is informational, not a universal specification, so applications may differ in delimiter and other CSV conventions. RFC 4180

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quoting commas, quotes, and line breaks

In the common format described by RFC 4180, a field containing a comma, quotation mark, or line break is enclosed in double quotes. A quotation mark inside that field is written twice. For example:

name,notes
Ari,"Likes apples, pears, and plums"
Mina,"She said ""hello"""

A quoted field can contain a line break, so a physical line in the file does not always correspond to one complete record. Spaces are part of field values; do not remove them unless that is intended. Keep the number of fields consistent across records when the receiving system expects a rectangular table.

Choose a creation method

Route Best for Trade-offs
Spreadsheet export A one-off file created from tabular data Accessible, but CSV export drops formatting and may export only one worksheet.
Code with a CSV library Repeatable exports or explicit control over parsing and writing Requires code and a CSV-aware library; configure it to match the destination application.

Create a CSV from Excel

Microsoft documents the following Save As or Save a Copy workflow for Excel for Microsoft 365, Excel 2024, and Excel 2021. Available file formats can depend on the active sheet. Microsoft: Save a workbook to text format

  1. Open the workbook and select the worksheet you want to export.
  2. Choose File > Save As or File > Save a Copy, then choose where to save the file.
  3. In the file-type control, select the CSV or text format that suits the receiving application.
  4. Save the file. If Excel warns that some workbook features are incompatible with the selected format, confirm only if exporting the active sheet as plain text is what you intend.

Microsoft says text-format saving removes formatting and CSV options save only the active sheet. Keep the original workbook if its layout, formulas, other sheets, or workbook features matter. Microsoft’s Excel export guidance

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create or read a CSV with Python

Python’s standard-library csv module provides reader and writer interfaces, along with dialect settings for CSV variations, including files associated with Excel. Use these interfaces rather than splitting each line on commas: commas and line breaks may be part of quoted fields. Python 3.14.8 csv module documentation

Open files with newline='' as shown in the module’s documentation, and specify the encoding appropriate to the data and destination. This example creates a comma-delimited file with a header:

import csv

rows = [
    {"name": "Ari", "notes": "Likes apples, pears, and plums"},
    {"name": "Mina", "notes": 'She said "hello"'},
]

with open("people.csv", "w", newline="", encoding="utf-8") as file:
    writer = csv.DictWriter(file, fieldnames=["name", "notes"])
    writer.writeheader()
    writer.writerows(rows)

The writer handles necessary quoting and quote escaping. For another delimiter or quoting convention, configure the module’s dialect or writer options to match the receiving application rather than assuming every CSV uses the same settings.

Rank #4
Sweetzer&Orange Large Meeting Notebook for Work, 208 Pages, 8.4”x11.2”
  • Make the Most Out of Your Meetings — Prevent discussions from going off-topic and wasting valuable time. Establish a clear agenda with this project notebook so the meeting stays on track, and focus on what needs to be addressed
  • A Centralized Location for Your Notes — Relying on your memory is a risk. Assign action items with deadlines in these project notebooks for work to help ensure accountability. Record notes, attendees and overviews in the structured layout of this business notebook organizer
  • Improve Team Communication — Review and recap team meetings with these work notebooks for note taking to prevent misunderstandings. Jot down questions and comments in this project planner notebook and ask for clarification if needed
  • A Notebook for Big Thinkers –– No need to squint to see your important notes. Including over 200 pages of thick 100gsm paper with large, readable print and a sturdy hardcover, these large project manager notebooks are a workday essential whether you're an intern or a business owner
  • Build Skills for Your Career — Support your professional development with this project management notebook. Use it as a one on one meeting notebook between you and your supervisor. Learn about time management, follow-ups and business priorities to set yourself up for success
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Import a CSV when columns do not line up

If a file opens in one column or splits into the wrong places, check the delimiter before treating the contents as damaged. Excel’s From Text/CSV import flow lets you choose a delimiter. Microsoft also notes that the list separator can depend on regional settings, so a file created under different conventions may need an explicit delimiter choice. Microsoft: Import or export text files

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Confirm whether the first record contains column names.
  • Choose the delimiter the file actually uses, such as a comma or another configured separator.
  • Check that fields with embedded commas, quotes, or line breaks are quoted and escaped correctly.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.