Skip to content
TablePage.ai Open the app

A CSV File Example You Can Copy and Publish

Copy a sample CSV with headers, quoted text, zero and missing values. Save it, check the imported table, and prepare it for public sharing.

Share X in f
Wei Hu

Copy the example below into a plain-text editor and save it as library_visits.csv with UTF-8 encoding. Copy only the contents of the code block, not its backticks.

This fictional dataset represents September visits to four library branches. Imported correctly, it produces five columns and four data rows, with a separate header row.

branch_id,branch_name,report_date,visits,note
001,"Central, East",2026-09-30,1250,"Includes an evening ""Open House"""
002,Riverside,2026-09-30,980,
003,Hilltop,2026-09-30,0,Closed for renovation
004,West End,2026-09-30,,Count not reported

How to read the example

CSV means comma-separated values. Commas separate fields, and the first row here names the columns. A header is optional in CSV, but this sample includes one so readers can identify each field. Each record has the same number of fields, following the common format documented in RFC 4180.

Column Meaning in this sample Intended interpretation
branch_id Three-character branch identifier Text; preserve leading zeros
branch_name Fictional branch name Text
report_date Last day of the reporting month Date written as YYYY-MM-DD
visits Visits recorded during September Nonnegative integer; blank means not reported
note Context for the count Optional text

Two fields demonstrate CSV quoting:

  • "Central, East" is one field, not two. Its comma belongs to the branch name.
  • "Includes an evening ""Open House""" becomes Includes an evening "Open House". Each literal double quote is doubled inside the quoted field.

Fields containing commas, double quotes or line breaks should be enclosed in straight double quotes; literal quotes inside them are doubled. These are the quoting rules in RFC 4180. For more examples, see how to escape commas and double quotes in CSV.

The blanks also have different meanings. Riverside has no note, so its row ends with a comma introducing an empty fifth field. West End has an empty visits field, shown by two adjacent commas. Hilltop’s 0 is a confirmed zero—not a missing count. These meanings are defined for this sample; document your own dataset’s blank, zero and missing-value conventions.

Check the saved file and imported table

First, reopen library_visits.csv in a text editor. Confirm that the filename does not end in .csv.txt, the separators are commas, and 001 is still present.

Then import it into your spreadsheet or data tool with comma-separated fields and the first row treated as headers. If everything appears in one column, check the delimiter selection.

For Excel’s desktop Get & Transform workflow, use Data → From Text/CSV rather than relying on automatic opening. Choose the comma delimiter. Microsoft explains that directly opening a CSV uses default format settings, which can reinterpret dates or remove leading zeros; its CSV import guidance describes controlled import options.

In the import preview, turn off automatic data type detection so columns default to text, then choose Transform Data to review them. Keep branch_id as text; set visits to a numeric type if you want to calculate totals. Disabling detection before conversion protects the original identifiers. These preview options are documented in Microsoft’s Text/CSV connector guidance.

Verify these results:

  • Four data rows and five columns.
  • Identifiers remain 001 through 004.
  • Central, East stays in one cell.
  • The note displays ordinary quotes around Open House.
  • Every reporting date represents September 30, 2026.
  • Hilltop’s count is 0; West End’s count remains missing.
  • The three reported counts total 2,230. That is not a complete four-branch total.

Prepare it for a public page

Publish only data cleared for public release. This fictional sample is suitable for a practice upload; replace it with reviewed, non-sensitive records for real work.

TablePage accepts CSV uploads and generates public dataset pages with shareable links and filterable tables. After uploading, check the displayed values again—especially identifiers, dates and missing counts—before sharing the link.

Accompany a real dataset with its source, reporting period, units and missing-value definitions. For this example, a suitable description is: “Fictional library visits for September 2026. Counts are visits, not unique visitors. Blank counts mean not reported.”