Retain Leading Zeros in CSV Import File

Retain Leading Zeros in CSV Import File

When working with data like ZIP codes, account numbers, or IDs, it's common to run into issues with leading zeros being removed during import. To ensure these values are preserved, you’ll want to prepare your spreadsheet using the steps below.

How It Works

Excel and other spreadsheet tools often interpret numeric data in ways that drop leading zeros. For instance, a ZIP code like “01234” may automatically be converted to “1234” if not properly formatted. To prevent this, you should treat the data as text before importing.

Step-by-Step Instructions

  1. Open your spreadsheet in Excel (or another compatible spreadsheet tool).
  2. Select the relevant column(s) and change the format to Text:
    • Right-click the column > Format Cells > Text.
  3. Manually re-enter values if the zeros have already been removed, or copy-paste them from an original source with the correct formatting.
  4. Save the file as a CSV (Comma-Separated Values) format.
  5. Import the CSV into your Delivra account as you normally would.
  6. Map the column to a Text field during the import step (e.g., Text1_ or another available text field).
  7. Verify your import by checking a few contact records to confirm the leading zeros were retained.

Tips for Success

  • Avoid formatting the column as "Number"—this will strip the zeros.
  • If working with long numeric codes (like 16-digit IDs), text formatting also helps avoid scientific notation.
  • Consider renaming the column header to something like “ZIP_Code_Text” to indicate special handling.
    • Related Articles

    • Import your contact lists

      Preparing your file Before we cover the process, let's talk about file preparation. The following are a few tips for a smooth import experience. Utilize a spreadsheet application to easily view and edit your data file. Organize each point of data ...
    • Reviewing Past Imports (Import History)

      Whether you're updating contact data via FTP or uploading a CSV file, it's helpful to be able to look back at past imports. Delivra’s Import History feature allows you to do just that. It's a useful tool for reviewing what was added or updated, ...
    • Contact CSV Import Expected Speeds

      When you're importing contact data into Delivra, speed matters—especially when you're working with large lists. Fortunately, Delivra’s Contact Import system is designed to handle files quickly, often processing over 2,000 records per minute. Still, a ...
    • How do I import a list of unsubscribed contacts to my account?

      If you have previously used an email service provider like Delivra, we recommend that you migrate any email subscribers that opted-out of campaigns you sent through that system. This way, you're ensuring that you don't all of a sudden start emailing ...
    • Import your contact list

      Importing contacts into Delivra is a straightforward process, but a little prep work goes a long way. By organizing your data ahead of time, you’ll ensure a smooth experience and help your campaigns take flight faster. File Preparation Tips Before ...