Troubleshooting Common CFDB7 CSV Export Issues in Excel
Content
Exporting form submissions from the Contact Form 7 Database Addon (CFDB7) is a powerful feature, but users often encounter problems when opening the resulting CSV files in Microsoft Excel. This guide explains the most common issues and how to resolve them.
1. Leading Zeros Disappear from Phone Numbers
The Problem: Phone numbers that start with a zero (e.g., 0612345678) appear in Excel without the leading zero (e.g., 612345678).
Why It Happens: This is not a plugin error. Excel automatically interprets numeric strings as numbers and strips leading zeros. The data in the raw CSV file is correct.
The Solution:
- Check the Raw File: Open the CSV file in a plain text editor like Notepad++. You will see the leading zero is present, confirming the export is correct.
- Import Correctly into Excel: Do not simply double-click the file. Instead, open Excel and use the Data > From Text/CSV import tool. In the preview window, select the column containing phone numbers and set its Data Type to Text. This will preserve all formatting.
- Use Google Sheets: Upload the file to Google Sheets, which typically handles this formatting issue automatically.
2. Line Breaks in Textareas Create Extra Rows
The Problem: When a form submission contains a textarea field with line breaks, the CSV export can appear to have broken rows when opened in Excel.
Why It Happens: CSV files use line breaks to separate rows. If a field's value contains a line break, Excel may interpret it as the start of a new row, corrupting the data structure.
The Solution:
- Use Google Sheets: Google Sheets correctly handles embedded line breaks within quoted CSV fields. Uploading your file there is often the quickest fix.
- Adjust Excel's Import Settings: Similar to the phone number issue, use Excel's data import wizard. Ensure the delimiter is set to a comma and that the text qualifier is set to double quotes (
"), which will correctly encapsulate fields containing line breaks.
3. All Data Appears in a Single Column
The Problem: Upon opening the CSV, all the data is stacked into a single column instead of being separated into multiple columns.
Why It Happens: This is almost always caused by incorrect delimiter settings in Excel, especially with regional settings that use a semicolon (;) instead of a comma (,) as the list separator.
The Solution:
- Do not double-click the file. Use Excel's Data > From Text/CSV import tool.
- In the import wizard, explicitly set the Delimiter to Comma.
- You can also change your system's regional settings to use a comma as the default list separator.
4. Date Formats Change
The Problem: A date entered as DD/MM/YYYY is displayed as MM/DD/YYYY in Excel.
Why It Happens: Excel automatically converts date-like strings into its own date format based on your system's regional settings.
The Solution:
- During the CSV import process in Excel, select the date column and manually set its Data Type to Text to prevent any automatic conversion. You can then reformat it as needed.
Key Takeaway
Most CSV export 'issues' are actually related to how spreadsheet software like Excel interprets the file. The 'Contact Form 7 Database Addon – CFDB7' plugin generates standard, comma-separated files correctly. The best practice is to always use your program's import function instead of opening the file directly, giving you control over how the data is formatted.
Related Support Threads Support
-
problem to export textareahttps://wordpress.org/support/topic/problem-to-export-textarea/
-
csv export column Issuehttps://wordpress.org/support/topic/csv-export-column-issue/
-
Extract csv with wrong rowshttps://wordpress.org/support/topic/extract-csv-with-wrong-rows/
-
Hide/remove first 3 columnshttps://wordpress.org/support/topic/hide-remove-first-3-columns/
-
selected itemshttps://wordpress.org/support/topic/selected-items/
-
Export to File, Cron Exporthttps://wordpress.org/support/topic/export-to-file-cron-export/
-
Attach Submission Details As CSV to Emailhttps://wordpress.org/support/topic/attach-submission-details-as-csv-to-email-2/
-
Export as CSV generates an empty .csv filehttps://wordpress.org/support/topic/export-as-csv-generates-an-empty-csv-file/
-
Download order changes each timehttps://wordpress.org/support/topic/download-order-changes-each-time/
-
Export csv doesnt contain date/timehttps://wordpress.org/support/topic/export-csv-doesnt-contain-date-time/
-
line-break in csvhttps://wordpress.org/support/topic/line-break-in-csv/
-
Export to csvhttps://wordpress.org/support/topic/export-to-csv-20/
-
Make export csv link publicly availablehttps://wordpress.org/support/topic/make-export-csv-link-publicly-available/
-
Export to CSV not working correctly on Repeatable Fieldshttps://wordpress.org/support/topic/export-to-csv-not-working-correctly-on-repeatable-fields/
-
EXPORT CSV FILEhttps://wordpress.org/support/topic/export-csv-file-4/
-
Date Formathttps://wordpress.org/support/topic/date-format-231/
-
Omit off g-recaptcha-response data in CSV exporthttps://wordpress.org/support/topic/omit-off-g-recaptcha-response-data-in-csv-export/
-
Phonenumber starts with 0 not in csv filehttps://wordpress.org/support/topic/phonenumber-starts-with-0-not-in-csv-file/
-
Export ALL Leads – 1 CSVhttps://wordpress.org/support/topic/export-all-leads-1-csv/
-
Question regarding data collectedhttps://wordpress.org/support/topic/question-regarding-data-collected/
-
Not all fields were exportedhttps://wordpress.org/support/topic/not-all-fields-were-exported/
-
Select lines to exporthttps://wordpress.org/support/topic/select-lines-to-export/
-
Export CSV for searched resultshttps://wordpress.org/support/topic/export-csv-for-searched-results/
-
CSV File Status Columnhttps://wordpress.org/support/topic/csv-file-status-column/
-
.csv export in batch modehttps://wordpress.org/support/topic/csv-export-in-batch-mode/
-
CSV export with empty uploaded file rowshttps://wordpress.org/support/topic/csv-export-with-empty-uploaded-file-rows/
-
CSV export problem. Multiline textarea (EOL)https://wordpress.org/support/topic/csv-export-problem-multiline-textarea-eol/
-
Telephone Numbers on exporthttps://wordpress.org/support/topic/telephone-numbers-on-export/
-
When Exporting to CSV File, Start ID Column at 1https://wordpress.org/support/topic/when-exporting-to-csv-file-start-id-column-at-1/
-
Wrong Label name in exported CSVhttps://wordpress.org/support/topic/wrong-label-name-in-exported-csv/
-
column headers repeated in csv after every 1000 entrieshttps://wordpress.org/support/topic/column-headers-repeated-in-csv-after-every-1000-entries/
-
Exclude some fields in the csv exporthttps://wordpress.org/support/topic/exclude-some-fields-in-the-csv-export/
-
How is the CSV formatted?https://wordpress.org/support/topic/how-is-the-csv-formatted/
-
Columns data moves every 1000 rowshttps://wordpress.org/support/topic/columns-data-moves-every-1000-rows/
-
Is there a way to export the CSV using another symbol as a separator?https://wordpress.org/support/topic/is-there-a-way-to-export-the-csv-using-another-symbol-as-a-separator/
-
Remove line breakshttps://wordpress.org/support/topic/remove-line-breaks-4/
-
Column csvhttps://wordpress.org/support/topic/column-csv/
-
Where is it storedhttps://wordpress.org/support/topic/where-is-it-stored/
-
CSV export via link / API callhttps://wordpress.org/support/topic/csv-export-via-link-api-call/
-
CSV File Information Structurehttps://wordpress.org/support/topic/csv-file-information-structure/
-
Additional Columns in CSV Exporthttps://wordpress.org/support/topic/additional-columns-in-csv-export/
-
Export to xlsxhttps://wordpress.org/support/topic/export-to-xlsx/
-
Export Filtered Search Results Only?https://wordpress.org/support/topic/export-filtered-search-results-only/
-
change field order in exported csvhttps://wordpress.org/support/topic/change-field-order-in-exported-csv/
-
CSV Exporting weirdhttps://wordpress.org/support/topic/csv-exporting-weird/
-
Attach Submission Details As CSV to Emailhttps://wordpress.org/support/topic/attach-submission-details-as-csv-to-email-3/
-
CSV Export, jumping fields.https://wordpress.org/support/topic/csv-export-jumping-fields/
-
(Re)move “Status” column in CSV?https://wordpress.org/support/topic/remove-status-column-in-csv/