+ Reply to Thread
Results 1 to 2 of 2

Leading Zeros in DIF Files Created in Excel Got Removed

  1. #1
    Registered User
    Join Date
    08-24-2010
    Location
    California
    MS-Off Ver
    Excel 2007, 2010
    Posts
    45

    Leading Zeros in DIF Files Created in Excel Got Removed

    Hi -

    Is there any way to keep the leading zeros when saving data to .DIF format? I tried formatting the column as text and adding a single quote ' sign in front of the number but neither worked.

    Input such like this:

    Customer Number
    000103 (Format = Text)
    000104 (entered as '000104)

    Once saved to .DIF (with warning from Excel that certain format will be stripped) and re-opened again, it becomes:

    Customer Number
    103
    104

    Thank you in advanced for your help!

  2. #2
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Leading Zeros in DIF Files Created in Excel Got Removed

    The problem with the .dif file, is that the single quote mark gets converted to double quotes around the text number.

    So this:

    '000103

    gets converted to this:

    "000103"

    you can open a dif file with notepad and check.

    It's when you re-open the file with Excel that the quoted text gets converted from text to numbers.

    The only way I can think of, is to add a double tick (two single quotes) in front of the numbers.

    Like this:

    ''000103

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1