+ Reply to Thread
Results 1 to 5 of 5

Why does the number format change when I save the file a CSV file

  1. #1
    Registered User
    Join Date
    03-12-2016
    Location
    Harare Zimbabwe
    MS-Off Ver
    2013
    Posts
    82

    Why does the number format change when I save the file a CSV file

    I got a list of numbers and added +263 to the front of it.

    I then saved it as a Microsoft Excel Comma Separated Values File (.csv) so I could then send the file to my cell phone and import the numbers into my phone book.

    When I opened the file to check it the number format has changed and I have no idea to change it to the format I need!
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Why does the number format change when I save the file a CSV file

    Excel's default is to open CSV files and interpret them immediately. Consequently, to Excel +263715698499 is a number with a plus-sign prefix...so therefore, a number.
    If you want to be able to set data types upon opening a CSV file:
    • Data.From_text_file
    ...select your CSV file...Click: Import
    ...Follow the prompts in the import windows.
    ...on the 3rd window: Check: Text <-so Excel will format the values as text, retaining and displaying the leading plus-signs.

    Is that something you can work with?
    Last edited by Ron Coderre; 03-20-2016 at 03:11 PM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Why does the number format change when I save the file a CSV file

    I think that it has to do with the width of the columns of Excel when you open the file. The width is too small to accommodate the data so translates that value into the shorter scientific notation.

    If you change the CSV extension to TXT and open with Notepad or other text editor, you will see the numbers as you entered them.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    03-12-2016
    Location
    Harare Zimbabwe
    MS-Off Ver
    2013
    Posts
    82

    Re: Why does the number format change when I save the file a CSV file

    Quote Originally Posted by Ron Coderre View Post
    Excel's default is to open CSV files and interpret them immediately. Consequently, to Excel +263715698499 is a number with a plus-sign prefix...so therefore, a number.
    If you want to be able to set data types upon opening a CSV file:
    • Data.From_text_file
    ...select your CSV file...Click: Import
    ...Follow the prompts in the import windows.
    ...on the 3rd window: Check: Text <-so Excel will format the values as text, retaining and displaying the leading plus-signs.

    Is that something you can work with?
    I am trying to follow the instructions you sent me.

    I don't know where or how to import the file from. I have opened Excel and gone to the file via open but cant find how to import. Sorry

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Why does the number format change when I save the file a CSV file

    From the Excel ribbon:
    • Data.From_text
    ...navigat to your CSV file and select it
    ...Click: Import

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. file save as tab delimited change to direct file save
    By bkanealy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-13-2016, 02:15 PM
  2. VB Code to change format, save in notepad file
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2016, 03:24 PM
  3. Macro needed to open "File Save As" and change save file type
    By blainerhett in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-28-2014, 02:40 PM
  4. Replies: 3
    Last Post: 02-04-2013, 12:18 PM
  5. Replies: 1
    Last Post: 01-16-2013, 02:02 AM
  6. Macro to save a file with a pre file name + week number from a cell
    By The.Dutchmaster in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-06-2012, 03:54 PM
  7. How to: Open file, format data, save file, close file and repeat.
    By thexeber in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-11-2010, 12:56 PM

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