+ Reply to Thread
Results 1 to 7 of 7

Format Changes

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    leicester
    MS-Off Ver
    Excel 2013
    Posts
    5

    Format Changes

    HI,

    The problem i am having is have a list of products for my website and when i change the format of the spreadsheet from a Macro Enabled Workbook to a CSV file my data changes.

    The data in the cells is plain data which has been copied and pasted as value so no formulas are attached to it and all of the cells are formatted as text.
    When i save the file to a CSV i get the following data changes

    Barcodes which look like 5045874123658751 are becoming 5045E+12
    and
    I have lists of years 2001,2002,2003,2004,2005 and so on which change to 200+21


    Does anybody know why this happens and how i can get around it?

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Format Changes

    Your macro enabled workbook will have cell formatting to display your barcodes as text or literal ... This is purely for worksheet display purposes.... The CSV file is displaying in standard form XX * 10eX but retains the full value of the number the same as the worksheet. If you want to force the CSV file to display the literal (full) value you have a few options :-
    1. Precede the barcode numbers with an apostrophe - to force literal display
    2. Precede the barcodes with a letter - to force it to display as text

    Are your years stored in individual cells because they should store the same in both XLSM and CSV..
    Elegant Simplicity............. Not Always

  3. #3
    Forum Contributor amit.wilson's Avatar
    Join Date
    07-09-2013
    Location
    Gotham
    MS-Off Ver
    Excel for Mac 2011
    Posts
    283

    Re: Format Changes

    Hello J,

    For the why question:

    Here is some information from an MS support website (http://support.microsoft.com/kb/158071)

    "Microsoft Excel supports a maximum of 15 significant digits at all times. This limit applies to a value that is calculated by a formula. Because of this limitation, if at any time a formula calculates a value that exceeds 15 digits in length, digits beyond the fifteenth significant digit are changed to zeroes."

    For the how to get around it, format the cell as text and not as a number.

    I've worked with the same problem when my company did some work for very long barcodes. Let me know if you need more help.

    Cheers
    <-- If you're happy & you know it...click the star.:-)

  4. #4
    Registered User
    Join Date
    10-07-2013
    Location
    leicester
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Format Changes

    Hi Andy,
    when the CSV file is uploaded to our website as the product database the barcodes remain as the 5045+12 meaning they effectively have no barcode on the website.
    The years are all in one cell seperated by commas.

    Hi Amit,
    I have formatted the cells as text before i saved the cells as a CSV file but when i reopen the file in the new formate the barcodes have changed.

    Thanks Both

  5. #5
    Forum Contributor amit.wilson's Avatar
    Join Date
    07-09-2013
    Location
    Gotham
    MS-Off Ver
    Excel for Mac 2011
    Posts
    283

    Re: Format Changes

    J - does the problem arise when the CSV file is opened as excel?

  6. #6
    Registered User
    Join Date
    10-07-2013
    Location
    leicester
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Format Changes

    Yes it does amit.

  7. #7
    Forum Contributor amit.wilson's Avatar
    Join Date
    07-09-2013
    Location
    Gotham
    MS-Off Ver
    Excel for Mac 2011
    Posts
    283

    Re: Format Changes

    J - you have two options:

    1. Use a text editor to open the CSV file. That way the format does not matter

    2. Or convert the CSV to excel and format the data as text.

    Going from CSV to excel and then saving it again as CSV will be a problem.

    Cheers

+ 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. Replies: 3
    Last Post: 05-15-2013, 12:16 AM
  2. Lock Cell Format - Allow copy and paste of data without format change
    By Chris12InKC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-11-2006, 12:50 AM
  3. Replies: 1
    Last Post: 12-09-2005, 01:00 PM
  4. Replies: 1
    Last Post: 09-10-2005, 05:05 AM
  5. Replies: 1
    Last Post: 01-31-2005, 09:06 AM

Tags for this Thread

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