Where Are My Leading Zeros?!

Published
When working with a comma separated values (CSV) file for import, it can be annoying to find that, when the file is opened in Excel, the leading zeros in certain fields are missing.

This can occur for fields such as dates and phone numbers and should you then proceed to import this file, then the information in Raiser’s Edge is incorrect.

Below is a list of steps for a way that you can use to open CSV files in Excel and retain the leading zeros.

  1. Save the CSV file to your local machine or network.
  2. Open a new worksheet in Excel. (see below for Excel screenshots.)
  3. Open the Data tab.
  4. Click on the From text button in the Get External Data section.
  5. Select your CSV file to import.
  6. Select the "Delimited" radio button -- Text Import Wizard, Step 1 determines that your data is delimited.
  7. Click Next.
  8. Check "Comma" as a delimiter (column dividers will appear in preview)-- Step 2 lets you set delimiters.
  9. Click Next.
  10. Highlight the columns in the preview pane on the bottom part of the Wizard.
  11. Mark those columns format as "text" by clicking the radio button in the Column Data Format section.
  12. Click Finish.
  13. Click Ok on the Import Data pop up and the leading zeros will still be there in the new worksheet with the imported data. The columns with real numbers will still be able to be used with calculations.

leadingzeropic1

 

leadingzeropic2

leadingzeropic3

leadingzeropic4

 

leadingzeropic5

Note that this is not the only method that can be used to retain leading zeros.

Please see How to prevent leading zeros from being dropped in Excel for an alternate option.

For more information about using spreadsheets with import, search Training Central using the keywords "Preparing Data for Import".
News Raiser's Edge® Blog 04/16/2014 6:00am EDT

Leave a Comment

Check back soon!

Share: