How to Use the Excel To Dbf: Step-by-Step Tutorial
This tutorial walks you through a complete Excel-to-DBF conversion using the Excel to DBF Converter. Each step includes the action to take, what to look for, and what to do when something doesn't go as expected. By the end, you'll have a standards-compliant dBASE III+ binary file ready to load into QGIS, ArcGIS, a legacy database, or any other DBF-aware application.
For background on what DBF is, why the format exists, and how the conversion engine makes decisions, see the Complete Guide to Excel To DBF.
Follow along with the tool: Open the converter in a new tab while you work through this tutorial.
Open Excel to DBF Converter โSteps in This Tutorial
Step 1: Prepare Your Excel File
A clean Excel file produces a clean DBF. Before opening the converter, take two minutes to review your spreadsheet:
- Row 1 must be your header row. The converter treats the first row as column names by default. If your data has a title row, a blank row, or any other content above the headers, delete those rows first.
- Shorten long column headers. DBF field names are capped at 10 characters. Headers like "Customer First Name" will be truncated to
CUSTOMER_Fautomatically โ but you'll get more meaningful field names if you abbreviate headers yourself first (e.g.,CUST_FNAME). - Clean up numeric columns. If a column should export as a Numeric field, make sure every non-empty cell contains a number. A single "N/A", dash, or note in an otherwise numeric column forces the entire column to Character type.
- Check date columns. Excel date cells export as
YYYY-MM-DDstrings, which the converter detects and classifies as DBF Date (D) fields. If your dates are stored as plain text in a format other thanYYYY-MM-DD, they'll export as Character. Reformat them in Excel first if you want the Date type. - Remove empty trailing rows and columns. Empty rows are filtered automatically if "Skip empty rows" is checked, but large empty regions can slow down parsing.
Sample scenario used in this tutorial: A municipal parks department has a spreadsheet of park features: Park ID (numeric), Park Name (text), Acreage (decimal), Has Restroom (yes/no), Last Inspection (date). The sheet is named "Features". This is a typical GIS attribute table scenario.
Step 2: Open the Converter
Navigate to the Excel to DBF Converter at /developer-tools/excel-to-dbf/. The page loads with a drop zone, a disabled Convert button, and no options visible โ the options panel appears after a file is loaded. No login, no signup, and nothing is sent to a server at any point.
Step 3: Drop or Browse Your File
There are two ways to load your Excel file:
- Drag and drop: Drag your
.xlsxor.xlsfile from your file manager and drop it anywhere on the page. A full-page overlay appears during the drag to confirm the target. - Browse: Click the "browse" link inside the drop zone to open a file picker. Select your file and click Open.
Once the file loads, the drop zone is replaced by a filename bar showing the file name. A ร button on the right lets you clear the file and start over.
Wrong file type error
If you drop a file that is not .xlsx or .xls, an error banner appears: "Wrong file type โ only .xlsx and .xls files are supported. You dropped a [ext] file." This is a client-side check โ drop or browse a valid Excel file to proceed.
Step 4: Select the Sheet to Convert
After the file loads, the options panel appears. The first control is the Sheet to Convert dropdown, which lists every worksheet in the workbook by name.
For our sample scenario, the dropdown shows one option: "Features". Click it to confirm the selection. If your workbook has multiple sheets โ say, "Features", "Boundaries", and "Metadata" โ select the sheet you want to convert. The converter processes one sheet per operation.
One sheet at a time. If you need multiple sheets as separate DBF files, run the conversion once per sheet and rename each downloaded file appropriately.
Step 5: Configure Conversion Options
The options panel has three controls beyond the sheet selector:
DBF Version
The version dropdown offers three choices:
- dBASE III+ (most compatible) โ The default. Use this for QGIS, ArcGIS, PostGIS, or any legacy application where you are unsure what version it expects. This is the version Esri Shapefiles require.
- dBASE IV โ Use when the target application explicitly requires dBASE IV format.
- dBASE 5 / Visual FoxPro โ Use when importing into a Visual FoxPro application.
For the parks scenario, leave this at dBASE III+ โ the output is for QGIS.
First row is header (field names)
This checkbox is checked by default. Leave it checked unless your spreadsheet has no header row and data starts at row 1. In that case, uncheck it and the converter generates synthetic field names (FIELD1, FIELD2, etc.).
Skip empty rows
This checkbox is checked by default. It filters out any row where every cell is blank. Leave it checked unless you specifically need empty rows preserved in the output.
Step 6: Click Convert to DBF
Click the blue Convert to DBF button. The conversion runs entirely in your browser โ there is no progress bar for most files because the operation completes in milliseconds. For very large files (100+ MB), there may be a brief pause.
The result appears immediately below the button row.
Step 7: Read the Status Bar
A coloured status bar appears beneath the button row:
- Green "โ Conversion complete" โ The conversion succeeded with no warnings. Your file is ready to download.
- Yellow "โน Converted with N warning(s)" โ The conversion succeeded, but something was automatically adjusted. Review the warnings panel before downloading.
- Red "โ Conversion failed" โ An error prevented the conversion from completing. The errors panel explains what went wrong.
For the parks scenario, the status should be green โ the data is clean and all columns map cleanly to DBF types.
Step 8: Review the Field Map
Below the status bar, a green "โ Conversion Complete" panel shows summary statistics: rows converted, DBF fields, input file size, and output file size. Below that is the Field Map table, which is the most important output to review before downloading.
The Field Map shows, for each column in your Excel sheet:
- Excel Column โ The original header as it appeared in your spreadsheet
- DBF Field Name โ The sanitised 10-character field name written to the DBF
- Type โ The inferred DBF field type (
C,N,D, orL) - Width โ The field width in bytes
For the parks scenario, the Field Map should look like this:
| Excel Column | DBF Field Name | Type | Width |
|---|---|---|---|
| Park ID | PARK_ID | N | 5 |
| Park Name | PARK_NAME | C | 32 |
| Acreage | ACREAGE | N | 8 |
| Has Restroom | HAS_RESTROO | L | 1 |
| Last Inspection | LAST_INSPEC | D | 8 |
Notice that "Has Restroom" was truncated to HAS_RESTROO (10 characters) and "Last Inspection" to LAST_INSPEC. Both names are still recognisable. The types are correct: N for numeric, C for text, L for logical (yes/no), and D for date.
What to check in the field map
- Verify every type is what you expect. A column you think is numeric showing as
Cmeans there's a non-numeric value somewhere โ go back to Excel, fix it, and reconvert. - Read truncated names carefully. If a truncated name is ambiguous (e.g., two columns both truncate to the same 10-character name), the duplicate gets a numeric suffix. Review whether you need to rename the source columns for clarity.
- Check Character field widths. A width of 254 on a C field means at least one cell in that column had a very long value. That's fine if expected; if it's a data anomaly, go back to Excel and find it with
=MAX(LEN(column)).
Step 9: Check for Warnings
If the status bar is yellow, a yellow warnings panel appears below the field map. Each warning describes an automatic adjustment the converter made. Common warnings include:
- "Workbook has N columns; dBASE III supports a maximum of 128 fields. Extra columns were dropped." โ Your spreadsheet had more than 128 columns. The first 128 were exported; the rest were silently dropped. If the dropped columns matter, split the data into multiple sheets under 128 columns each and convert each separately.
- "Column 'Header Name' truncated/sanitised to field name 'FIELDNAME'." โ A column header contained characters that aren't valid in DBF field names (spaces, special characters, etc.) and was automatically cleaned up. Review the field map to confirm the sanitised name is usable.
- "Duplicate column 'Header Name' renamed to 'FIELDNAME2'." โ Two columns produced the same sanitised 10-character name. The second was suffixed with a number. Rename the source columns before reconverting if you need distinct names.
Warnings are not failures. A yellow status means the file converted successfully with automatic adjustments. Review each warning, confirm the adjustment is acceptable, then download. If any warning represents a real problem, fix the source file and reconvert before downloading.
Step 10: Download Your .dbf File
Once you're satisfied with the field map and have reviewed any warnings, click the green โฌ Download .dbf button. The browser downloads the file immediately โ the filename is your original Excel filename with the extension changed to .dbf.
For example: park-features.xlsx โ park-features.dbf
The file is written from memory โ nothing is stored on any server, and the download link does not persist. If you need the file again, you'll need to reconvert.
After downloading
Before using the DBF in production:
- For GIS workflows: Rename the file to match your Shapefile's base name (e.g.,
parks.dbfto matchparks.shp) and place it in the same directory. Open the Shapefile in QGIS or ArcGIS and confirm the attribute table loads correctly with the expected columns and row count. - For legacy database imports: Test-load the DBF into a non-production instance of your target application before using it in a live system.
- To validate the DBF structure: Drop the file into the DBF Validator to confirm header integrity, field definitions, record count, and encoding before deployment.
Troubleshooting Common Problems
The options panel doesn't appear after dropping the file
The workbook couldn't be parsed. This usually means the file is password-protected, corrupted, or not actually an Excel file (e.g., a .csv renamed to .xlsx). Check the status bar for an error message. Try opening the file in Excel to confirm it opens normally, then re-save it and try again.
A numeric column is showing type C in the field map
At least one non-empty cell in that column contains a non-numeric value. Open Excel, filter the column for non-numbers using the AutoFilter or =ISNUMBER(A2) check, resolve the anomalous cells, and reconvert.
All my columns are showing as C (Character)
The "First row is header" checkbox may be unchecked when it should be checked, or your data has a blank row between the header and data rows. Confirm that row 1 in your selected sheet is the actual header row and that row 2 begins the data.
The downloaded .dbf shows the wrong record count in my GIS application
The DBF record count is written from the number of non-empty data rows in the selected sheet. If the count in your GIS application doesn't match, check whether "Skip empty rows" filtered out rows you needed, or whether your sheet had blank rows interspersed in the data.
My target application rejects the DBF
Try switching the DBF Version from dBASE III+ to the version your target application expects (IV or Visual FoxPro). Also check whether the application requires a specific code page โ if it needs Latin-1 or Windows-1252 extended characters and your data contains them, those characters may need to be removed or substituted before conversion.
Real-World Examples
Example 1: Creating a Shapefile attribute table for QGIS
You have a spreadsheet of 847 census block groups with columns for Block ID, Population, Median Income, Area (sq km), and Urban Classification. The spreadsheet has clean headers in row 1 and data from row 2.
- Abbreviate the headers if needed: "Block ID" โ
BLOCK_ID, "Median Income" โMED_INC, "Urban Classification" โURB_CLASS. - Drop the file into the converter, select the correct sheet.
- Leave version at dBASE III+, both checkboxes checked.
- Click Convert. Review the field map: Block ID should be
N, PopulationN, Median IncomeN, AreaN, Urban ClassificationC. - Download as
census-blocks.dbf. - Rename to match your Shapefile:
census.dbf. Place alongsidecensus.shp,census.shx,census.prj. - Open in QGIS โ Layer โ Add Layer โ Add Vector Layer. The attribute table shows all 847 features with correct columns.
Example 2: Updating a FoxPro legacy application's rate table
A logistics company's legacy routing application reads rate tables as DBF files. The rate table has: Origin Code (text, 3 chars), Destination Code (text, 3 chars), Base Rate (decimal), Fuel Surcharge (decimal), Effective Date (date).
- Prepare the rate table in Excel. Ensure Effective Date cells are formatted as dates in Excel (not text).
- Drop the file into the converter.
- Change DBF Version to dBASE 5 / Visual FoxPro.
- Click Convert. Field map: Origin Code โ
Cwidth 3, Destination Code โCwidth 3, Base Rate โN, Fuel Surcharge โN, Effective Date โD. - Download and copy to the application's data directory, replacing the previous rate table file.
Example 3: Government property database export
A county assessor provides a 40,000-row property database in Excel with 22 columns including parcel numbers, owner names, addresses, assessment values, and zoning codes. Several columns have values like "EXEMPT", "N/A", and blank cells mixed in with numbers.
- Review the field map after converting. Columns that should be numeric but show as
Ccontain non-numeric values. Note which columns. - In Excel, filter each affected column for non-numeric values. Replace "N/A" with 0 or another sentinel value that makes sense for the data. Remove "EXEMPT" if it belongs in a separate boolean column.
- Reconvert. This time the affected columns show
Nin the field map. - Download. The resulting DBF loads cleanly into the destination database.
