Ecommerce & CRM Imports
Cleaning Messy CSVs Before Shopify & CRM Imports
Shopify, HubSpot, and Mailchimp reject imports over strict RFC 4180 quoting, hidden header spaces, and 15 MB caps. Here is how to diagnose exact platform errors and scrub files locally before uploading.
Open Clean for CRM / Shopify Preset
1. Exact Shopify & CRM CSV Import Errors (and What Triggers Them)
Most failed Shopify product or customer imports happen right after someone opens a supplier spreadsheet in Excel, edits a few prices or descriptions, and saves it back as CSV. Shopify uses a strict RFC 4180 parser on the backend: a single unescaped inch mark (24" Monitor) or stray double quote inside a Body (HTML) cell triggers an immediate abort with "Punctuation can't be used: illegal quoting in line X."
Header errors are the second biggest culprit. A single trailing space in a column name ("Email " instead of "Email"), a duplicated header column, or a semicolon delimiter exported from a European Excel install causes Shopify to report "Missing header or missing headers" and HubSpot to fail column auto-mapping.
| Exact Error / Failure | What Caused It in the File | How to Fix Before Re-Uploading |
|---|---|---|
| Shopify: "Illegal quoting in line X" | Unescaped " inside Body (HTML) or Title (e.g., 24" screen or curly quotes ❝). | Escape internal quotes as "" per RFC 4180, or run Preview Auto-Fix to repair broken quote boundaries. |
| Shopify: "CSV file is bigger than 15 MB" | Product or customer export exceeds Shopify's 15 MB single-file upload ceiling. | Deduplicate rows, drop unused columns, and split remaining records into <15 MB batches. |
| Shopify / HubSpot: "Missing headers" / unmapped columns | Trailing spaces in header names, duplicate header labels, or semicolon (;) delimiters. | Trim header whitespace, standardize to comma (,) delimiters, and rename duplicate headers. |
| CRM duplicate contacts / bounced rows | Same customer exported twice with trailing spaces (" [email protected] " vs "[email protected]"). | Trim cell whitespace first, then deduplicate on the Email column before import. |
2. Embedded Line Breaks, Duplicate Headers, and OWASP Formula Injection
Ecommerce product descriptions and CRM notes routinely contain multi-line HTML or street addresses inside quoted cells ("Line 1\nLine 2"). Naive text scripts or spreadsheet macros that split files on newline characters tear those rows in half, shifting every column after the description into the wrong field. Always clean CSVs with a quote-aware state machine that removes only true blank records while preserving line breaks inside quoted fields.
If your CSV contains user-submitted fields (order notes, company names, support form entries) that staff will later open in Excel, watch out for OWASP CSV Formula Injection. Any cell starting with =, +, -, @, Tab (\t), or Carriage Return (\r) can execute as a formula when opened in a spreadsheet. A good formula guard prefixes risky strings (like =HYPERLINK(...) or @SUM) with a single quote (') while explicitly exempting legitimate negative numbers such as -12.50 or +42 so accounting totals stay numeric.
Never apply Formula Guard to JSON or API payloads: Prefixing cells with a single quote is strictly a spreadsheet defense. When converting CSV to JSON or uploading to a strict API that validates phone numbers (+1-555-0100), keep Formula Guard turned off.
3. Six-Point Pre-Import Scrub Checklist
Running these six checks takes under a minute locally and prevents multi-hour Shopify email error loops or polluted CRM records:
- Load the export with the Clean for CRM / Shopify preset so commas, RFC 4180 quotes, whitespace trimming, and blank-row removal apply together.
- Inspect the Column Health Bar for duplicate headers, empty columns, or ragged rows (rows with fewer or more columns than the header).
- Open Preview Auto-Fix to review character-level diffs before applying repairs—never let a tool silently drop extra columns without showing you what changed.
- If importing CRM contacts, enable Deduplicate on your Email or Customer ID column and verify the exact row reduction count.
- Check file size against your platform cap (15 MB for Shopify product/customer CSVs) before uploading.
- Save your cleaning steps as a reusable Recipe so next month's supplier export takes one drop and one click.