+ Reply to Thread
Results 1 to 4 of 4

.csv file shortens numbers with "E+"

  1. #1
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    .csv file shortens numbers with "E+"

    Hi,

    I have a csv file which contains some long numbers, excel seems to want to abbreviate them. Is there any way to override this so this does not happen when the file is opened.

    For example in my current file the a cell containing 230702063986 will show up as "2.307E+11". I've tried changing the cell format to a custom format which does solve the problem, however when attempting to save it then says the file now contains features which are not compatible with CSV.

    Any ideas?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: .csv file shortens numbers with "E+"

    if the numbers are longer than 15 digits, Use Data|Text to columns to format the columns as text (3rd window in text to columns wizard).

    if they are less than or equal to 15 digits, try formatting as Number with 0 decimals.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    Re: .csv file shortens numbers with "E+"

    This does work. However when you save it and try and reopen it, it's back to the general format.

    What really gets me is that it shortens 230702063986 to 2.307E+11, but in the cell directly next to it I have 1VW48047HY988773R which appears unabbreviated. Madness.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: .csv file shortens numbers with "E+"

    no its not madness 1VW48047HY988773R is text ,230702063986 is a number two different things
    but unfortunately when saved as csv , text formatted numbers and real numbers look the same
    this is opened with notepad
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    so when you open with excel it sees it as a number format.
    however if you rename the .csv to .txt then open with excel you can set the field to text in the wizard
    Last edited by martindwilson; 06-28-2012 at 06:08 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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