모아위키
Published on

Open CSV in Excel Without Losing Leading Zeros: An Import Checklist

Import the original CSV through Excel's Text/CSV import flow and set identifier columns to Text before loading them. If zeros or digits have already disappeared, start again from an intact source file.

This walkthrough targets desktop Excel with Power Query. Button names and available import options vary by edition and platform. It is about preserving codes, not preventing every kind of spreadsheet conversion.

Import identifiers as text

In Data → From Text/CSV, select the original file and open Transform Data (called Edit in some versions). Select identifier columns, set their data type to Text, and choose Replace Current if prompted. Check the preview before Close & Load. Microsoft's leading-zero guidance documents this approach.

Inspect any automatic Changed Type step: a later text conversion cannot restore characters discarded earlier. Replace or remove the conversion affecting your identifiers and verify them against the original before loading. Keep quantities numeric if you need arithmetic, but treat product codes and other identifiers as text.

Excel numeric precision is limited to 15 significant digits. A custom display format does not repair a long identifier already altered by numeric conversion. Reimport from an intact source rather than guessing the lost characters.

Try this small sample before your real import

Copy the following invented data into a plain-text file named import-check.csv, saved as UTF-8. None of the identifiers represent real accounts or people.

item_code,reference_code,quantity,label
00123,12345678901234567,2,Café
00007,98765432109876543,10,서울

The example deliberately separates identifiers from a quantity. Your acceptance check is:

ColumnFirst row should containSecond row should containIntended type
item_code0012300007Text
reference_code1234567890123456798765432109876543Text
quantity210Number
labelCafé서울Text

Compare the loaded cells with this table, including every digit in each reference code. A compact scientific-notation display is a reason to investigate, not evidence that the underlying identifier is intact. This fixture is an editorial diagnostic example; it is not a report of testing every Excel edition.

Check character encoding separately

Missing zeros and garbled names need different checks. Microsoft's UTF-8 CSV guidance says UTF-8 CSV files with a byte-order mark can be opened normally, while other UTF-8 files can be imported through Power Query or the text import flow. In the import preview, select the encoding matching the source and inspect names such as Café and 서울 before proceeding. A BOM does not establish that identifier columns will be treated as text.

If the source uses another encoding, do not label it UTF-8 just because that option is available. Ask how the exporting system created it or inspect its export settings. Also verify the delimiter: a row appearing in one column may indicate a separator mismatch rather than a damaged file.

Keep an untouched source and a checked workbook

Use separate filenames so a mistaken save cannot replace your only reference:

source-export.csv
checked-import.xlsx
import-review.txt

In the review note, record the source date, expected row count, identifier columns, and a few checked records. Choose examples with leading zeros, long codes, and non-English characters if your real data contains them.

Before handing the workbook to someone else, check both the first and last relevant records and compare a sample from the middle. For an important dataset, sample inspection alone is insufficient: compare all identifiers with the original using a suitable validation process.

Questions that cause repeat problems

Can I fix the column by changing its format afterward?

If the original characters are gone, formatting does not tell you what they were. Return to the source. In the sample above, the exact expected strings are available, so you can detect a mismatch without inventing a padding rule for arbitrary identifiers.

Why does the problem return when I reopen the CSV?

CSV stores field content without Excel workbook formatting. Opening it through a different path can apply type inference again. Keep the checked workbook for spreadsheet work, and use an explicit import procedure when someone needs the CSV.

What if my Excel does not show these buttons?

Consult the import instructions for your specific edition. The acceptance criteria stay the same: the loaded identifiers must match the source exactly, and text must be readable. Do not substitute a double-click workflow without checking its output.

For another conversion review process, see PDF to Markdown: check tables and missing text.

Microsoft documentation checked October 2, 2026. The sample CSV and review procedure are original editorial examples.