Data & Spreadsheets Field notes

Edit CSV Files Without Losing Leading Zeros or Long Numbers

Keep CSV identifiers as text, check saved values, and choose an editing workflow. Two small tests cover leading zeros, long IDs, Chinese text and quoted commas.

By WorkToolMapGuide updated Seven synthetic rows · October 2026Inputs & results included
The short answer

Keep every digit in your CSV.

Treat identifiers as text and test an unchanged save first. ConvertCSV preserved the full small sample; TableConvert’s tested CSV-to-CSV route failed quoted-field checks.

Get the sample files
IDENTIFIERS STAY TEXT.CSV
Original identifierKeep the full value
0012300123✓
123123✓
1234567890123456789012345678901234567890✓
1234567890123456789112345678901234567891✓
Leading zerosEvery last digit

ConvertCSV4/4 saved files preserve the full table

TableConvert0/4 saved files preserve the full table

Identifiers shown from the seven-row synthetic sample. ConvertCSV preserved the full table; TableConvert’s quoted fields failed even though IDs remained intact. Checked 10 October 2026.
  1. 01

    Keep the source

    Work on a copy. Include leading zeros, long IDs and quoted commas.

  2. 02

    Save before editing

    Check an unchanged export, then make only the intended cell edits.

  3. 03

    Reopen and compare

    Verify the header, row order and every saved field, not just the preview.

Choose the workflow before you open the file

If a recurring task already lives in a spreadsheet, use its text import controls for identifiers before loading the data. For a small one-off CSV edit, a CSV editor can be simpler: open a copy, change the intended cells, save, then verify the saved file. Our ConvertCSV route preserved this sample; the TableConvert CSV-to-CSV route did not.

Start with a small sample containing your awkward values, including quotes and commas. Check an unedited save first, then make a known edit and reopen it. If digits or leading zeros have already changed, return to the original source and reconcile by a stable record ID. Changing a display format cannot establish the missing original digits.

Scroll the table horizontally to see all 3 columns.

Choose by task; only the two CSV editors below were run for this guide.
TaskStarting routeEvidence and boundary
Repeated work already in ExcelImport identifier columns as TextOfficial-document review, not a live workbook test in this guide.
A few cell edits in a small CSVConvertCSV CSV Viewer and EditorTested with 7 synthetic rows; preserve a source copy and verify your own export.
CSV with commas and quotes inside fieldsUse a route that passes a quoted-field round tripOur TableConvert 3.0.1 CSV-to-CSV run failed this sample.
Find missing members after editingCompare Two Lists with one selected ID columnA subsequent membership check, not a general CSV editor or multi-field reconciler.

The sample and the only permitted edits

The download has 7 data rows and 6 columns: record_id, text_id, code, city, status and note. Every field is expected to be a literal string. UTF-8 input files with and without a BOM contain the same parsed table. The independent expected.json was frozen before either editor was used.

The two edits are r02.status: pending → checked, and r05.note: 合成记录 5 → 已核对, "保留原文". Keep every other value, the header, all 7 rows and their order. The untouched r01.note is 合成记录 1, "仓库A". Chinese cities alternate 广州 and 上海.

A CSV has separators and quoting, but no stored spreadsheet column types. The string 00123 must stay different from 123; the two 20-digit IDs must keep their different final digits. 1E10 and 03-04 are identifiers here, not a number and a date.

Scroll the table horizontally to see all 5 columns.

Identifier-by-identifier checks across both input encodings, before and after the edits. Full values for every field are in expected.json and observed.json.
Recordtext_id expectedcode expectedConvertCSVTableConvert
r01001231E10Exact in both encodings and both savesIDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid
r0212303-04Exact in both encodings and both savesIDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid
r0312345678901234567890SKU-AExact in both encodings and both savesIDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid
r041234567890123456789100123Exact in both encodings and both savesIDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid
r0500012345678901234567890123Exact in both encodings and both savesIDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid
r061E1003-04Exact in both encodings and both savesIDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid
r0703-041E10Exact in both encodings and both savesIDs exact in tolerant diagnostic parsing; the CSV as a whole is invalid

What the saved files actually contained

Both products were used in Chrome 152 on Windows on 10 October 2026. Each opened both input encodings, saved an unedited CSV, made the two specified edits, saved a second CSV and reopened both outputs. We then parsed the downloaded bytes independently with Python’s standard CSV parser. This checks the file as well as the screen.

ConvertCSV retained the six-column header, 7 rows in order, all untouched fields, Chinese text and embedded comma/quote characters. Exactly the two intended values changed. Four saved files passed strict parsing and full field comparison; four application reopens displayed the expected values.

TableConvert displayed r01.note in two cells as soon as the original CSV was imported. The unedited export already had a seventh empty header and invalid embedded quoting. After editing, r02.status was checked, but the saved r05.note was not safely escaped and split again on reopen. All four primary outputs failed. Explicitly confirming comma, Newline and Double Quote Wrap did not change the failing unedited bytes. We found no source quote-interpretation control in this interface.

The leading-zero and long-ID columns stayed intact in TableConvert’s display and tolerant diagnostic parse. That does not make its full output usable: strict CSV parsing failed. The failed files are downloadable so the boundary is reproducible.

Scroll the table horizontally to see all 4 columns.

Completed workflows and data results. A completed test can have a FAIL result.
ProductVersion / check timeComplete saved-file resultObserved scope
ConvertCSVWeb page checked 10 October 2026; no build version displayed4/4 saved files preserve the full tableAll 7 rows x 6 fields matched before and after exactly two edits for both input encodings; all 4 saved files reopened correctly.
TableConvert3.0.1 (checked 10 October 2026)0/4 saved files preserve the full tableBoth inputs opened and were edited, saved and reopened. The quoted comma in r01.note split into two cells; header/output gained an extra seventh column and embedded quotes were malformed. Text IDs themselves remained visible and unchanged in tolerant diagnostic parsing. Strict output was invalid CSV.

Run the ConvertCSV route

Open the official CSV Viewer and Editor linked below. Expand Input Options; choose UTF-8, comma and First row is column names. Leave Treat double quote as data and single-quote text handling off. Keep the output header and CRLF line ending. Load input-utf8.csv or input-utf8-bom.csv. Verify the header and all seven IDs before saving.

Download CSV once without editing. Then double-click the status cell on r02, replace pending with checked, and commit. Change the note cell on r05 to the exact text above and commit. Download CSV again. Clear the editor and load each saved file; reselect UTF-8/header options if they reset. In our reopen check, Clear All reset those controls, so the header appeared as the first grid row while its file values remained correct.

Compare the reopened values and the independent parser result. The editor’s spare blank row and column were not exported in this run. Test your receiving application too: our browser round trip does not prove how a spreadsheet or an upload service will interpret the same file.

  • ConvertCSV — measured CSV editing route — On 10 October 2026, ConvertCSV’s CSV Viewer and Editor preserved all 7 rows × 6 fields in our small synthetic test. Both UTF-8 inputs (with and without BOM) were saved unchanged, then with exactly two edits; all 4 downloaded CSVs passed independent field comparison and application reopen checks. We used comma, a header row, UTF-8 and standard double-quote parsing. This does not test every ConvertCSV converter or large files.
Sources & further reading

The TableConvert failure and the alternative

The tested route was CSV to CSV, file import, comma output, Newline, Double Quote Wrap on and UTF-8 BOM off. The source preview still contained the original quoted field, but the grid split it. We made the same status and note edits, downloaded the files and reopened them. This was an actual completed workflow with a failed data result.

For this kind of quoted-field CSV, use a route that passes the untouched save and edited save checks, such as the ConvertCSV route in this small test. Do not manually stitch the split cells and call that preservation. Keep the original file when an import changes the column count, and resolve the parser/settings problem before editing real records.

  • TableConvert — measured CSV-to-CSV boundary — On 10 October 2026, TableConvert 3.0.1 completed opening, editing, saving and reopening our 7-row CSV, but all 4 primary saved files failed strict CSV/value checks. In both UTF-8 input variants, a quoted comma split r01.note into two cells; output gained a seventh column and malformed embedded quotes. The text IDs remained unchanged in diagnostic parsing. This is a task-specific failure in CSV-to-CSV mode, not a test of every converter.
Sources & further reading

Excel text import — document review, not hands-on tested

Microsoft documents Data → From Text/CSV and the query editor’s Text column type. For this fixture, set record_id, text_id and code to Text before loading; inspect the preview before accepting a numeric conversion. Keep the original CSV. Microsoft notes 15 significant digits of numeric precision and that later formatting does not recover previously removed zeros or digits.

The legacy Text Import Wizard also lets you choose a delimiter, a double-quote text qualifier and Text for selected columns. Use comma and check that the quoted note stays in one cell. Menus vary by Excel version. Automatic Data Conversions controls are documented for Microsoft 365 and Excel 2024; do not assume every installation has them.

We could not operate a verified Excel workbook in this run. These are official-document instructions, not an Excel export result or a measured ranking. Before relying on this route, perform the same unedited save, two edits, CSV save and reopen comparison against expected.json.

Separate data changes from file-format changes

The two inputs are 426 bytes without BOM and 429 bytes with BOM. ConvertCSV’s unedited outputs were 426 bytes and edited outputs 441 bytes, regardless of input BOM. They used UTF-8 without BOM, CRLF and valid minimal quoting. Removing the BOM did not change parsed values in this run.

TableConvert’s unedited outputs were 533 bytes and edited outputs 544 bytes, using UTF-8 without BOM and LF, with no final newline. LF instead of CRLF is a format difference. Extra columns and unescaped quotes are data/CSV validity failures. observed.json records the exact bytes, SHA-256, newline counts, strict errors and every differing field.

This is a small synthetic test, not a large-file speed test, a privacy audit, formula-safety testing or a data recovery promise. Modern CSV, Tablecruncher and other converters were not tested. For a different delimiter, multiline field or receiving system, repeat the small round trip first.

After editing: compare the intended ID column

Once the saved CSV is verified, a membership tool can find IDs missing from another list. Select the ID column, exclude the header and choose matching rules deliberately. Compare Two Lists does not edit the CSV, reconcile all fields or prove that the remaining fields are correct.

WorkToolMap and comparetwolists.net are both maintained by Jack. The linked comparison guide discloses that relationship and provides separate membership-test evidence.

Download the inputs, exact expectations and real outputs

All records are synthetic. expected.json contains every original value and the two edits; observed.json contains independent rereads, application reopen records and limits. Files labeled FAIL are preserved failed exports, not corrected examples. README.md explains the settings and verification command. manifest.json provides exact download byte counts and SHA-256.

A few useful answers

Common questions

Why can 00123 become 123?

CSV stores text and separators, not spreadsheet column types. A receiving application may interpret an identifier as a number. Import identifier columns as text and check the saved values.

Can formatting recover digits that have already changed?

Changing the display format cannot establish missing original digits. Return to an unchanged source and reconcile records by a stable ID. The tests here do not establish a recovery method.

Are correct ID columns enough to trust an export?

No. In the TableConvert run the IDs remained visible, but quoted fields split and strict CSV parsing failed. Check the entire table, including embedded commas, quotes and non-English text.

Does removing a UTF-8 BOM mean the data changed?

Not necessarily. ConvertCSV removed the BOM in this test while preserving every parsed value. Encoding and line endings should be checked separately from field values, and your receiving system should be tested too.

Task verification and evidence

Third-party CSV editing tests with one synthetic table. Tested 10 October 2026. ConvertCSV passed this sample; TableConvert 3.0.1 failed the tested CSV-to-CSV route. Original failed exports are preserved.

These checks apply to the stated inputs and route. General pricing, platform and processing fields keep their own source dates and unknown values.

Evidence files and checksums — csv-preservation-v1