PORTABILITY STUDY / VERSION 1.0.0
CSV portability test: what survives three local handoffs?
A deterministic comparison of raw normalized CSV, positional JSON and a protective viewing CSV across leading zeros, duplicate headings, blank cells, Unicode, multiline text and formula-like strings.
THE QUESTION
Which local export preserves the exact strings and table shape in a controlled CSV fixture?
THE MEASURED ANSWER
Raw normalized CSV and positional JSON each reconstructed all 24 data strings. The protective viewing CSV reconstructed 21 of 24 because it deliberately added a visible text: label to three formula-like strings.
Results
| Method | Purpose | Exact data strings | Shape | Headings | Output bytes |
|---|---|---|---|---|---|
| Raw normalized CSV | Faithful text handoff | 24 / 24 (100%) | Preserved | Preserved | 293 |
| Positional JSON | Explicit columns-and-rows handoff | 24 / 24 (100%) | Preserved | Preserved | 576 |
| Protective viewing CSV | Human-viewing copy with visible labels | 21 / 24 (87.5%) | Preserved | Preserved | 311 |
The viewing CSV changed =1+2, -12 and @owner to visibly labeled strings. That result is expected behavior for this export: it is a separate human-viewing copy. The raw CSV and positional JSON remain the faithful handoff options in this controlled run.
Method
- Build one six-column fixture with four data records and 24 data cells. It includes leading zeros, duplicate and blank headings, empty cells, commas, quotes, LF and CRLF inside fields, Unicode, whitespace, a tab and formula-like text.
- Serialize the same in-memory rows as raw normalized CSV, positional JSON, and protective viewing CSV through the published CSV Table Lab logic.
- Parse each CSV through the same documented local parser. Reconstruct the JSON table from its ordered
columnsandrowsarrays. - Compare each reconstructed data cell with the original using exact JavaScript string equality. Check record width, record count and heading positions separately.
- Generate the JSON, CSV and chart from that execution. Unit tests assert the two 24-of-24 results and the three deliberate viewing-copy changes.
Test conditions
- Runtime
- Node.js 22.23.0
- Execution
- Single-process deterministic Node.js run with no network access
- Parser
- Useful Horizons CSV Table Lab parser
- Encoding
- UTF-8
- CSV record separator
- CRLF
- Comparison unit
- Exact JavaScript string equality for each of 24 data cells; headings and record shape checked separately
Limits
- This is one controlled fixture and one local implementation. It does not measure Microsoft Excel, Google Sheets, database importers or other CSV dialects.
- Exact reconstruction establishes string and shape preservation in this round trip. It does not validate the business meaning or accuracy of a value.
- The comparison does not test locale-dependent type inference, legacy encodings, byte-order marks, very large files or network transfer.
- The protective viewing CSV is intentionally value-changing and makes no universal promise about spreadsheet formula execution. Keep a pristine raw copy and test the receiving application.
For the format rules behind this method, see RFC 4180, RFC 8259, and the W3C Model for Tabular Data and Metadata on the Web.
Version and corrections
Version 1.0.0 ·
Initial fixture, deterministic comparison and public evidence files. No corrections recorded.
Continue the investigation
Read Choose a CSV or JSON handoff, reproduce a smaller case in CSV Table Lab, browse all field guides, or return to the Useful Horizons home page.
About the author: Awesome Patel’s Useful Horizons profile.