Excel tries to help by guessing types
A DBF schema distinguishes character, numeric, date, logical and memo fields. CSV does not. When a CSV is opened directly, Excel may remove leading zeros, convert long identifiers to scientific notation, interpret day and month in the wrong order, or round numbers beyond its precision. The CSV can be correct while the spreadsheet view is already altered.
Classify columns before export
| DBF content | Target handling | Example risk |
|---|---|---|
| Account, postal or product code | Text | 00125 becoming 125 |
| Identifier longer than 15 digits | Text | Last digits rounded or replaced |
| Date | Explicit date format | 03/04 interpreted by the wrong locale |
| Decimal amount | Numeric with documented decimal separator | Comma confused with CSV delimiter |
| Memo text | Quoted UTF-8 text | Line breaks splitting a naïve import |
Correct the source code page before exporting. Select UTF-8, an appropriate delimiter and ISO-style dates where possible. Keep field names stable and store the mapping from abbreviated DBF names to business labels in a separate data dictionary.
Use Excel's explicit text import
- Create a new workbook and use the data import command for text/CSV instead of double-clicking the file.
- Select UTF-8 and the delimiter chosen during export.
- Inspect the preview for shifted columns, embedded line breaks and accents.
- Set identifier columns to Text before loading. Do not convert them back to General.
- Confirm date interpretation and decimal locale, then load into a new worksheet.
- Save as XLSX under a new filename; retain the original UTF-8 CSV as the exchange copy.
Prove that the workbook still represents the DBF
Compare record counts, including a documented decision about deleted DBF records. Check sums for important amount and quantity fields. Compare minimum and maximum dates. Search for identifiers with leading zeros and inspect values at the 15-digit boundary. Sample accented names and multiline memos.
If formulas or cleanup rules are added, keep them in separate columns or a second worksheet. That separation preserves a trace from the source value to the cleaned value. For the export itself, follow the local DBF-to-CSV procedure; for encoding problems, use the code-page diagnosis guide.