+ Reply to Thread
Results 1 to 3 of 3

Save as .csv file removes trailing 00

Hybrid View

  1. #1
    Geir Holme
    Guest

    Save as .csv file removes trailing 00

    Hi all.
    I have a XL sheet with one column containing tekst and values. It is
    partnumbers. Some of these starts with trailing nulls (the number 0). Like
    00AB25 or 00056P-SDF.

    It is populated from SQL Server 2000 varchar(30) field.

    When I save as .csv file XL removes the trailing 0's and the partnumber in
    the csv file changes to AB25 and 56P-SDF. Any ideas how to avoid this?


    thanx.

    geir




  2. #2
    Forum Contributor
    Join Date
    08-22-2005
    Location
    Denmark
    MS-Off Ver
    Excel 365
    Posts
    349
    In the raw .csv file the leading nulls are preserved (try opening it with Notepad and you will see), but when Excel reopens the file it converts them to numbers. But only those partnumbers that do not contain letters.

    It is a clumsy solution, but you can rename your .csv to .txt. When you then open it you get to choose Delimited (next), Comma (next) and finally Column data format = text.

    By the way, anyone know why my .csv files are actually semikolon delimited?

  3. #3
    Stefi
    Guest

    Re: Save as .csv file removes trailing 00

    Hi nsv,
    What language version do you use? I experienced that it depends on language
    version. US version uses the original comma, my Hungarian version uses
    semicolon, once I read in an old thread, that Swedish version also uses
    semicolon. I was told that it is defined by Windows' list separator
    (International settings), but changing it had no effect on Xl's behaviour.

    Regards,
    Stefi


    „nsv” ezt *rta:

    >
    > In the raw .csv file the leading nulls are preserved (try opening it
    > with Notepad and you will see), but when Excel reopens the file it
    > converts them to numbers. But only those partnumbers that do not
    > contain letters.
    >
    > It is a clumsy solution, but you can rename your .csv to .txt. When you
    > then open it you get to choose Delimited (next), Comma (next) and
    > finally Column data format = text.
    >
    > By the way, anyone know why my .csv files are actually semikolon
    > delimited?
    >
    >
    > --
    > nsv
    > ------------------------------------------------------------------------
    > nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
    > View this thread: http://www.excelforum.com/showthread...hreadid=466716
    >
    >


+ 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