Code Beautify / Guides

From spreadsheet rows to API records: what should you check?

A spreadsheet export is a table of cells; an API usually expects named fields and types. Converting punctuation is only the first step.

Inspect the source table

Start with a CSV table whose header is id,name,active and whose two rows are 001,Ada,true and 002,Bo,false. The embedded CSV-to-JSON tool turns each data row into an object keyed by the header. That is useful for seeing structure, but do not assume it has decided what the fields mean. An identifier such as 001 should often stay text; coercing it into the number 1 loses the leading zeros. The word true might be a boolean in a destination schema or the literal text a user entered. Write those field types down before importing.

Check CSV grammar before types

CSV fields can contain commas, quotation marks and line breaks when quoted according to the dialect in use. A naive split on every comma can shift columns and make a valid address or title look like two fields. RFC 4180 describes a common format, but real exports vary in delimiter, quote handling, header presence and character encoding. If a spreadsheet uses semicolons or tabs, select or transform that format deliberately instead of feeding it to a comma-only parser. Check that every row has the expected number of fields and that the header names are unique.

A table needs an explicit schema before import.
  1. CSV header + two rows
  2. JSON array: two named objects
  3. API schema: confirm id, active and missing values

Choose the receiving shape

A JSON array holds the two row objects together and is convenient for a small batch request. JSON Lines places one complete JSON value on each line and can suit a stream or a system that processes records independently. A URL query string is usually a set of short parameters, not a transport for arbitrary spreadsheet tables. The destination API decides which shape is valid. The JSON-array-to-lines tool changes framing without inventing a schema, and converting back should preserve the two objects if every line is valid JSON.

Resolve missing and special values

An empty CSV cell can mean an empty string, an unknown value or no value; those are not equivalent in every API. A blank active cell should not automatically become false. Numbers with a decimal comma, dates written without a time zone and identifiers with leading zeros need explicit handling before import. Use a test row that contains a comma in a quoted name, a blank cell and a non-ASCII character to see what the converter preserves. Check the API’s documented required fields and reject rows that cannot be represented faithfully rather than silently guessing.

Validate the round trip and destination

After conversion, inspect the JSON for two objects, three expected keys and values with the intended types. Convert a copy back to CSV to notice changes in quoting or field order; a visually similar table does not guarantee identical source bytes. Send only a small test batch to an actual API when its schema and authorization are ready. The MultiVerto tools run in your browser and help examine representation, but they cannot verify a remote API contract or authorize an import. Keep the original export and a written mapping from each column to each destination field for later auditing.

Try the converter

Convert two CSV rows to JSON and inspect their field types.

Turn a header-based CSV table into JSON objects.

Open full converter

More guides

Conversion guides

Explore guides