Table of Contents
A CSV file stores plain text fields, not a workbook's cell formatting. When a spreadsheet opens the file, it may interpret a field as a number, date, or other type. A product code such as 00123 can therefore change appearance or value before you notice. Treat importing as a data-checking task rather than simply opening a file.
Create a sample with an obvious expected result
Use fictional data and keep the original CSV unchanged. In a plain text editor, create a file containing the following lines. Save it with a .csv extension using a normal text encoding such as UTF-8.
ProductCode,Description,Quantity 00123,Blue notebook,4 00007,Green folder,2 01005,Black pen,6
Before importing, write down what must remain true: three data rows, three columns, five characters in each product code, and quantities totalling 12. These expectations give you a small checklist independent of Excel's preview.
Inspect the import preview
In supported desktop Excel versions, use Data > From Text/CSV to select the sample. Inspect the preview before loading. The separator should divide ProductCode, Description, and Quantity into separate columns. If the whole line appears in one column, check the delimiter selection rather than immediately splitting the loaded sheet.
Interface labels differ between Excel versions. Use the import or transformation controls available in your installation. The important distinction is that product codes are identifiers, while quantities are numbers you intend to calculate with.
Choose text for identifiers before conversion
Use the transformation or import options to assign ProductCode a Text type before a numeric conversion removes its zeros. Inspect any automatic type-detection step and correct it if needed. Assign the quantity column an appropriate numeric type separately.
Changing a cell's appearance after importing does not establish that its original characters survived. If a code has already become 123, go back to the unchanged source and import it with the intended type. Do not reconstruct missing characters by guessing a width unless the data specification explicitly defines that width.
Check the loaded rows
Compare the first and last rows with the text file. Confirm that 00123, 00007, and 01005 are still represented as intended. Check the row count and calculate the quantity total. A total of 12 is a useful check for this sample, but a correct total alone does not prove every identifier is intact.
For a real import, also inspect blank fields, punctuation, and a few unusual records. A description containing a comma needs correct CSV quoting. An encoding mismatch can alter names or symbols without changing the number of rows. Investigate mismatches against the source instead of manually correcting only the visible examples.
Save the working file and test any export
Keep an Excel workbook copy for your analysis. If you later export to CSV, inspect that exported text and test how the receiving application interprets it. A downstream program can make different type assumptions. Document the intended columns and types when sharing data with someone else.
A display format that shows five digits is useful in some workflows, but it is not the same as a text identifier. Decide which representation the destination requires before applying formatting or building lookups.
References and related practice
See Microsoft's guidance on text and CSV imports and preserving leading zeros. After checking the import, practice with our Excel shortcut guide. Guidance reviewed 22 October 2026.
Written by Challenge Hub Team
Challenge Hub publishes practical software references under a shared editorial name. This byline does not claim a professional credential or independent product endorsement. Report corrections with the page URL, software version, and observed behavior.
Discussion & Comments
0 Comments