Retail data · Tested December 1, 2026

Which CSV imports preserve retail identifiers?

Four parcel IDs differed only in their last digit. After a standard LibreOffice Calc import and XLSX export, all four were stored as 123456789012346000. Selecting Text for the identifier columns before import preserved every digit.

Download the four-row sampleDownload the measured values

What each reader kept

Each cell counts exact matches with the original four strings. The SKU column has two easily confused pairs, 000123 and 123, plus 000007 and 7. The collection column mixes letters with numeric-looking codes.

Exact matches out of four, by field
Reader and import modeSKUParcel IDCollection
Python csv · default4/44/44/4
pandas · automatic2/44/44/4
DuckDB · automatic4/44/44/4
Calc · standard columns2/40/42/4
Explicit text in pandas, DuckDB or Calc4/44/44/4

In pandas, 000123 and 123 both became 123. An exact SKU lookup could now return two products. On this file DuckDB preserved both spellings even with automatic type detection. Other files can lead a reader to infer different types.

Check a supplier file before matching products

  1. Keep the supplier’s original CSV. Open a copy through the import dialog, select the SKU, parcel and collection columns, and set their type to Text. Leave quantities numeric.
  2. Compare exact strings and the number of distinct identifiers against the original. A visual spot check can miss a digit at the end of a long value.
  3. If values collapsed, import the original again with text fields. Formatting the damaged cells as text cannot recover which product or parcel each row meant.

Check original identifiers before importing a Sheet

Repeat or cite this test

Save the comparison script beside supplier.csv. We ran Python 3.12.13, pandas 3.1.2, DuckDB 2.0.1, openpyxl 3.1.5 and LibreOffice Calc 24.2.7.2. In a Python virtual environment with LibreOffice installed, use these commands.

python -m pip install pandas==3.1.2 duckdb==2.0.1 openpyxl==3.1.5
python compare.py --soffice soffice > my-results.csv

Calc used comma separation, UTF-8, a double-quote delimiter and special-number detection off. The script reads the exact decimal saved in the XLSX XML. Python’s CSV reader provides the original strings. These measurements apply to the synthetic labels, versions and settings above.

Cite as bulldo.gs, Which CSV imports preserve retail identifiers?, December 1, 2026. Permanent page.

Read about the import settings in Python csv · pandas read_csv · DuckDB type detection · LibreOffice filter options.