Documents & OCRPractical guides

CSV to Excel without losing IDs: delimiters, types and a three-row check

Check CSV encoding and delimiters first, choose text/number/date by column purpose, then reopen the XLSX. This complete three-record exercise includes leading zeros, a 17-digit identifier, a UTF-8 name, zero and blank amounts, with typed reference answers beyond a successful download.

A calculator, papers and glasses on a desk, illustrating spreadsheet import
Illustrative photo: Berke Citak · Unsplash License

What changed: Added a three-record semicolon CSV, precision/date failure cases, a typed reference workbook and post-export cell checks.

The practical answer

Choose UTF-8 and semicolon with the first row as header: expect four preview rows including the header and four columns. Keep OrderID/Customer as text, Amount as number and Day as date. Preserve 0007,12345678901234567 and 0013; Amount becomes 12.5,0 and blank instead of relying on automatic type inference.

Keep the complete input separate from answer files

source-semicolon.csv is UTF-8 with semicolon separators. typed-import-reference.xlsx and expected-values.json are answers; bad-date.csv is a deliberately faulty copy. IDs are fictional. The ë in Zoë checks whether multibyte characters decode correctly.

Complete source-semicolon.csv

OrderID;Customer;Amount;Day
0007;Zoë;12.50;2026-10-26
12345678901234567;Bo;0;2026-10-27
0013;Ada;;2026-10-27
One header and three data records. The third Amount is blank, unlike Bo’s zero.

This guide checks delimiters and column typing; CSV does not carry Excel cell types. For prior structure conversion, follow the CSV/JSON round trip before returning to type decisions here.

Get four columns before choosing types

  1. Open CSV to Excel and select source-semicolon.csv. Choose UTF-8, semicolon and First row is header.
  2. Expect four rows including the header and four columns named OrderID,Customer,Amount,Day. One combined column suggests the wrong delimiter; a corrupted Zoë calls for checking the actual encoding. Do not delete unfamiliar characters to make a name look readable.
  3. Check all three IDs before setting types. Large-file previews are partial and do not validate a batch from its first ten rows; this three-record exercise can be reviewed in full.

Columns default to text. That avoids actively rewriting source text but leaves you responsible for deciding which columns should calculate. Encoding, field boundaries and typing are separate checks.

Choose each column’s type and deliberately trigger a failure

  1. Set column 3 to Number and column 4 to Date, keeping columns 1/2 as Text. A two-decimal display may show 12.50 while the underlying number is 12.5.
  2. Temporarily set column 1 to Number. The 17-digit ID in row 3 must block this conversion. Restore Text and process again; a previous download is not the result of the changed settings.
  3. Try bad-date.csv: row 3 has 2026-02-30 and must fail Date conversion. This exercise’s confirmed source says 2026-10-27, so reload source-semicolon.csv and restore the type choices. In real work, confirm the source rather than replacing invalid dates with today.
Types and reasons for the four columns
ColumnChoiceAcceptance focus
1 OrderIDTextKeep 0007 and the complete 17-digit ID
2 CustomerTextPreserve Zoë
3 AmountNumber12.50 becomes numeric 12.5; zero stays valid; blank stays blank
4 DayDate YYYY-MM-DDKeep the calendar date; receiver display formatting may differ

Microsoft’s leading-zero and large-number guidance explains automatic numeric conversion risks. Display formatting cannot reliably restore already-lost ID characters.

Keep long identifiers as text

9007199254740993 is outside JavaScript’s safe integer range. Treating it as an ordinary number can change its final digit. KitNelo rejects numeric conversions with precision risk rather than silently deciding what an identifier should become. When type validation fails, check whether the column is an identifier and restore text if appropriate.

0007 demonstrates a different problem. It can become the exact number 7 while losing its original identifier representation. Product codes, account identifiers and postal codes generally do not need arithmetic. If only 7 survives in the source, an importer cannot know whether the intended text was 0007,007 or 07.

Preserve the value before styling its appearance

Problem example

Import sku as a number, then display 7 using a four-digit format.

Corrected reference

Import the original text 0007 and verify the final digit of the long identifier.

A display format can make a number look like an identifier without preserving the original text.

Reopen and inspect three records, four columns and three amount states

Download the XLSX, reopen it in the receiving software and compare types/values with the reference. Sheet names, styling and workbook bytes may differ. Inspect each full ID; amounts should support numeric calculation while the blank must not become 0.

Per-record reference answers
OrderID (text)CustomerAmountDay
0007ZoëNumber 12.52026-10-26
12345678901234567BoNumber 02026-10-27
0013AdaBlank; meaning unresolved2026-10-27

Accepting this XLSX

  • Three business records and four columns; the header was not treated as data or converted to dates.
  • All three IDs remain exact text and Zoë is correctly decoded.
  • Distinguish numeric 12.5, numeric 0 and blank; retain all three calendar dates.
  • Repair both deliberate failures from reliable source values and regenerate the current valid output.

For ISO source dates, compare the calendar date even when a receiver uses a different display format. For upstream JSON identifiers, see the JSON-to-Excel numeric-text boundary.

Know when to return to the source

Current import limits are 20 MB,100,000 rows,300 columns and 2 million cells. Inconsistent row widths or decoding failures prevent conversion. When splitting a large export, retain headers and whole records; do not cut through a newline inside a quoted field.

Conversion runs locally in the browser. Continue with CSV and JSON field checks if you need JSON, or the column-name merge and provenance guide before combining workbooks.

Common questions

Why do column types reset after a delimiter change?

Changing encoding or delimiter reparses the file and can change column boundaries. Review the new preview and assign types again.

Does a blank numeric field become zero?

This converter preserves blank input. Missing values and recorded zeros mean different things and should be resolved from the source.

Does an XLSX export establish that the data is trustworthy?

No. Structural and type checks do not establish record completeness, correct business amounts or the factual accuracy of dates.

Further reading & sources

Put the guide into practice

Open the relevant tool, preview the result and check your exported file.

Newer articles on this topic

Continue with a newer article that refers to this guide or explainer.

Related articles