Contact

Zoho Sheet web application · Import and data integrity · Intermediate

Preserve Leading Zeros When Importing CSV into Zoho Sheet

Use a reversible text-prefix staging CSV, then recover exact identifier characters with MID and validate long IDs, leading zeros, and date-like codes.

Documentation checked 2026-10-16; CSV and string transformations independently verified; not tested in Zoho Sheet · Editorial standards

Quick answer: Preserve identifiers as text before numeric conversion can discard their characters. Zoho’s current import help documents CSV settings, but does not establish a specific “import this column as Text” option. This guide therefore uses a reversible workaround: prefix sensitive-to-conversion fields in a staging CSV, import that copy, then remove the prefix with text formulas and verify every result. The original CSV stays unchanged.

This is a documented-function-based preservation technique, not a claim that an unmodified CSV has been proven to import safely under every account or locale. It covers the English Zoho Sheet web application, with official sources checked October 16, 2026. No numbered web release or mobile/desktop equivalence is asserted. It has not been tested in the application.

Why display formatting is too late

A product code 00123 and a quantity 123 have different meanings. If the importer converts the code to numeric 123, changing its display cannot tell you whether the original had one, two, or five leading zeros. A long ID can also be damaged by numeric conversion. Restoring characters from the original source is safer than guessing.

Similarly, 03/04/2026 may be a literal source string that must stay exactly that way. Converting it into a date can change its representation and introduce a day/month interpretation. Preserve the text first; decide separately whether a reporting column should contain a real date.

CSV quotation marks delimit fields. They do not provide a portable spreadsheet Text cell type. Do not treat quoting alone, a custom zero-padding format, or reopening a damaged CSV as proof of preservation.

1. Use the paired practice files

Download the untouched raw CSV and prepared staging CSV. These are synthetic, four-row, comma-delimited UTF-8 files. Open them in a text editor to compare the actual characters rather than letting another spreadsheet reinterpret them first.

The raw data is:

ProductCode,LongCode,SourceDate,Quantity
00123,00012345678901234567,03/04/2026,2
00007,98765432109876543210,2026-04-03,3
01000,00000000000000000001,04/03/2026,5
00000,12345678901234567890,2026-12-31,7

The staging copy adds ID: to the first two fields and DATE: to the third. Quantity remains numeric-looking data:

ProductCode,LongCode,SourceDate,Quantity
ID:00123,ID:00012345678901234567,DATE:03/04/2026,2
ID:00007,ID:98765432109876543210,DATE:2026-04-03,3
ID:01000,ID:00000000000000000001,DATE:04/03/2026,5
ID:00000,ID:12345678901234567890,DATE:2026-12-31,7

These prefixes make the staging fields ordinary label-like strings rather than bare numeric/date candidates. They are temporary transport markers, not part of the final IDs. If your original ID already begins ID:, prepend the marker anyway and remove only the one newly added prefix later.

For your own files, use a CSV-aware export/preparation tool to prepend markers to the intended fields, preserving quoting, embedded commas, line breaks, and encoding. Do not split arbitrary CSV rows on commas or run a global replacement across the whole file. Do not open and resave the original through a spreadsheet that has already converted the identifiers. For a tiny exercise, the prepared download avoids that preparation step.

2. Import the staging copy into a disposable spreadsheet

  1. Choose File → Import and select identifier-import-staged.csv.
  2. Inspect the preview and CSV settings. Choose comma as the delimiter; review decimal/thousands separators for your real numeric fields. For this fixture, Quantity contains simple whole numbers.
  3. Confirm that all four fields are present and the visible identifier/date strings still have their prefixes and full characters.
  4. Choose Next, then a new-spreadsheet destination rather than appending to or replacing production data.
  5. Confirm headers occupy A1:D1 and the four data records occupy rows 2–5. If they do not, correct the import before using the cell references below.

These menu and import-destination choices are documented in Importing spreadsheets to Zoho Sheet. Its public illustration shows a preview; it does not verify an exact Text-type dropdown choice. Do not assume another product’s conversion checkbox exists here.

A successful upload is only the first checkpoint. Stop if values have already changed. Keep the staging and original files so that you can restart without reconstructing missing characters.

3. Recover text in separate columns

Leave A:D intact as evidence of what was imported. Add these headers and formulas:

Cell Header or formula Purpose
E1 ProductCode_Text Recovered product code
E2 =MID(A2;4;LEN(A2)-3) Skip the three-character ID: marker
F1 LongCode_Text Recovered long identifier
F2 =MID(B2;4;LEN(B2)-3) Skip only the added ID: marker
G1 SourceDate_Text Source string, deliberately not a date
G2 =MID(C2;6;LEN(C2)-5) Skip the five-character DATE: marker

Fill E2:G2 through row 5. Use ordinary result cells where formulas evaluate rather than being stored literally as text. The semicolons follow Zoho’s English function reference. If your account expects a different separator, use its accepted syntax without changing the argument order.

Zoho MID extracts characters from a starting position; Zoho LEN counts characters, including spaces. The first original character is at position 4 after ID:, or 6 after DATE:. Subtracting the marker length recovers the complete remainder. No VALUE, arithmetic coercion, or date parsing is applied to the recovered fields.

4. Validate characters, type, and quantities

Expected recovered values:

Sheet row E: ProductCode_Text F: LongCode_Text G: SourceDate_Text
2 00123 00012345678901234567 03/04/2026
3 00007 98765432109876543210 2026-04-03
4 01000 00000000000000000001 04/03/2026
5 00000 12345678901234567890 2026-12-31

Run these checks in spare General-format cells:

  • =LEN(E2) → 5; every recovered product code in this fixture has length 5.
  • =LEN(F2) → 20; every recovered long code has length 20.
  • =EXACT(E2;"00123") → TRUE.
  • =EXACT(F2;"00012345678901234567") → TRUE.
  • =EXACT(G2;"03/04/2026") → TRUE.
  • =ISTEXT(E2) and =ISTEXT(F2) → TRUE.
  • =D2+D3+D4+D5 → 17, for the four intact quantities 2, 3, 5, and 7.

EXACT compares strings case-sensitively; ISTEXT checks text type. Length alone cannot detect a wrong digit or swapped rows, so compare full strings and record identity too. These expectations were calculated independently, not captured from Zoho.

For a real file, audit every important identifier against the original, including blanks, the longest code, all-zero codes, and unusual punctuation. The fixture has no blank protected fields; if your staging process prefixes an empty field, decide explicitly whether the recovered empty text or a truly empty cell is required downstream and test it.

Troubleshooting and safe handoff

  • Formula displays literally: Check whether the result cell is formatted as Text or begins with an apostrophe; change the result-cell format appropriately and re-enter the formula. Do not change the staged source strings.
  • A result loses its first characters: Confirm every source row has the expected marker before applying the formula. Never strip three characters from an unprefixed raw identifier.
  • Characters look garbled: Resolve file encoding before accepting the import. The supplied fixture is ASCII-compatible UTF-8; it does not test non-Latin import behavior.
  • Numbers should calculate but IDs should not: Keep Quantity numeric and recovered IDs textual. Converting all columns to numbers defeats the separation.
  • A code was already shortened: Return to the untouched raw export. The formula can remove a prefix; it cannot recover digits lost before staging.
  • Sharing a CSV afterward: CSV still carries no durable cell types. The receiving application must preserve text again. Keep a character-level check of any exported file, and validate any paste-as-values or format conversion before retiring the formula-based copy.

Do not apply this technique indiscriminately to untrusted formula-like content or treat it as a comprehensive security sanitizer. The example is a controlled identifier-preservation exercise.

For more examples, see MID, LEN, EXACT, and ISTEXT.

Verification: Official documentation checked October 16, 2026. The CSV parser, prefix/recovery logic, lengths, exact strings, and quantity total were independently checked. No Zoho import, native formula result, export round trip, or screenshot was observed. Validate the sample in your account before processing important data.