Notes › Tech Notes › One Invalid Snippet Turns 100 Rows Into 0: Cell Values and the Row Ledger When JSON Becomes a Table

One Invalid Snippet Turns 100 Rows Into 0: Cell Values and the Row Ledger When JSON Becomes a Table

What values become when they land in cells: booleans, null, objects, arrays and long integers each take a different rewrite path; one invalid snippet zeroes out all 100 rows, and the preview, download and clipboard paths report different byte totals for the same input.

What Goes In Is JSON; What Lands in the Cell Is a Different String

An array that looks perfectly tidy on the page still fails to match the preview once it is pasted into the converter: booleans turn into English words, the last three digits of a long integer are replaced with zeros, a leading zero without quotes condemns the whole document, and a nested array refuses to produce a single extra row. Worse, mixing 1 invalid snippet into 100 rows does not return "one row fewer" but 0 rows, and clicking download produces no file at all.

These numbers are not guesses: I loaded the script block of this page's template into Node as it is and called the page's own functions to reproduce every case without changing a line of logic. Every figure below comes from this JSON to Excel page, measuring what a value becomes when it lands in a cell and how the same input differs in bytes across the preview, the download and the clipboard paths.

What Each of the Seven Value Kinds Becomes

Rendering has only one String conversion, yet each value type travels a different rewrite path. With the header on and flattening off, the default setting, the per-cell measurements are as follows.

Value typeWritten in the source asLands in the cell asIn one line
Boolean and null[{"v":true},{"v":false},{"v":null}]English literalthree cells of 4, 5, 0 characters
Object[{"v":{"a":1}}]whole joined stringevery key name in the source is dropped
Array[{"v":[1,2,3]}]comma joinbrackets and quotes disappear
Very long integer1234567890123456789012345678901234567000still 20 characters, the last 3 reset to zero
Beyond safe integers90071992547409939007199254740992an odd tail becomes even
Scientific notation1e21 and 10000000000000000000001e+21both spellings land on the same 5 characters
Leading zeroquoted "0012" / bare 0012kept as 4 characters / parse failsthe latter returns rows: 0 | cols: 0

Jot down two contrasts: quote the same long integer and write it as a string, and all 20 digits survive, the whole download coming to 28 bytes; the date string "2024-01-01T08:00:00Z" lands as itself, 20 characters, and this page folds it into no serial number at all.

However Deep the Nesting, the Row Count Never Moves

The row count only measures the length of the top-level array. In the source [{"id":1,"items":[1,2]},{"id":2,"items":[1,2,3]},{"id":3,"items":[1,2,3,4]}] the inner arrays hold 9 values in total, yet the page reports only rows: 3 - every items array is squeezed into one cell, a comma-joined string while flattening is off. Swap items for 3 objects and that cell becomes a 47-character three-part join, in which 0 of the 6 source keys can be found, and with or without flattening the physical row count is still 1. So this is not "two rows lost"; the nested tier simply has no standing to become a row. How flattened key names are spelled and how header columns are merged is already counted in a separate piece on the header key union and flattening; this article measures only rows and cell text and does not repeat it.

One Input, Three Exits, Three Byte Totals

The default first-screen document has a source string of 130 bytes, and the same value is written to different lengths on three paths. The preview area is a table HTML of 242 bytes, the download file is 72 bytes, clicking copy yields 64 bytes of tab-separated text on the clipboard, and the CSV text in between is 69 bytes. Unchecking the include-header box shrinks the download file to 57 bytes, and the gap is exactly the header row. The three endings differ too: the download file pairs carriage return with line feed, the clipboard uses single newlines with the last one shaved off, so do not expect copy and download to match byte for byte. The preview table on this document holds 9 cells and 4 row tags, matching the rows and cols figures in the status line one by one.

Three paths for the same 130-byte input Preview 242 Download file 72 Clipboard 64 Header off 57

Figure 1: the same input with a 130-byte source string measured three ways - preview 242, download 72, clipboard 64, header-off download 57 bytes

An Empty Document Yields an Empty Table; a Bare Scalar Yields a Red Box

Empty input is far more than "an empty table". [] parses and produces an empty table with a header skeleton and zero columns, a download file of 5 bytes; {} yields 7 bytes; [{},{},{}] shows rows: 3 in the status line and downloads 11 bytes, yet the copyable text is 0 bytes - three empty rows shaved off together at the end. On the other side, writing the top level as a scalar - "abc", 123, true, null - all four inputs receive the same red-box sentence "data is not an object or array", the preview area is cleared without even leaving the empty placeholder, and download and copy each pop a single line: "please enter valid JSON data first".

The Batch Ledger and the Collapse Caused by One Invalid Snippet

A normal batch never quietly loses rows. The 100-row sample downloads 1730 bytes, of which the CSV text is 1727 bytes; the 1000-row sample downloads 20066 bytes with a preview HTML of 52140 bytes, the rows count equal to the top-level count one by one, and the 10, 100 and 1000 tiers all lose nothing silently. But once a single invalid snippet is mixed into the end of the 100 rows, the whole batch goes to zero at once: rows: 0, the preview cleared, and clicking download produces not one file. Fix the invalid fragment and paste it again, and only then does it return to rows: 100 | cols: 3, CSV 1727 bytes.

One invalid snippet zeroes out the whole batch Normal sample rows: 100, CSV 1727 bytes Mixed 1 invalid rows: 0, no file produced Fix it, re-paste, and it returns to rows: 100 | cols: 3

Figure 2: row counts for the 100-row normal sample and after one invalid snippet is mixed in - the latter collapses the whole batch to 0 rows

"Paste into Excel" Is Not Exporting Excel

This page has exactly one download button, and its product is a CSV file carrying the UTF-8 byte-order mark; the template contains no code path that generates an Excel (.xlsx) file, so the file byte counts of Excel and TSV simply do not exist here. What the copy-table action hands over for pasting into Excel is tab-separated text on the clipboard, not a file, and when a value contains a newline even "one row" stops matching - the source [{"v":"line1\nline2"}] shows rows: 1 in the status line, its 21-byte download file splits into 3 segments on line feeds but only 2 pairs of line endings, and the 13-byte copied text carries 2 newlines, so pasting it into a spreadsheet app reads 3 rows. If the input itself is not straightened out yet, hand it to JSON format first to fix the key order and indentation, then return to this page for the cell landing, and you will trip over fewer parse failures.

Questions and Answers

Q: Why does the tail of a long integer become 000?

It is not lost inside the grid; it is rewritten at the parse stage: 12345678901234567890 cannot be stored within the numeric range, so by the time the value lands in a cell it is already 12345678901234567000. To keep all 20 digits, write it as a quoted string.

Q: If 1 place is wrong in 100 rows, can it just skip that row?

It cannot. This page parses and renders the document as a whole, so one invalid snippet drives rows: straight to 0, clears the preview and produces no download file, rather than giving one row fewer.

Q: Can I get an Excel file directly from this page?

No. This page has only two exits, the CSV download and the clipboard copy, with no code path that produces .xlsx, so the file byte count of Excel is not something to discuss here.

📎 Related articles

The Page Lists Six Input Formats but Offers Only 3 Output Buttons: The Byte Budget of One 480x320 Image 2026-11-24 Splitting And Merging 20 Samples Back: Only 11 Restore The Original Byte For Byte 2026-11-24 24 whitespace code points survive even with every box checked: a per-code-point truth table for text trimming 2026-11-23 Paste 133 Characters, Copy Out 149: Six Rewrites of Value Text in the JSON View 2026-11-23 A malformed URL into the parser page: example.com:80 is read as the protocol, and %e stops the segment table halfway 2026-11-21