Skip to main content
January 6, 2009
Question

UPC in Excel

  • January 6, 2009
  • 2 replies
  • 278 views
I have a UPC number like 0721059227513 when i output it to Excel it ends up like this: 7.21059E+11 in the SQL DB the feild is a char. How can I keep it looking like: 0721059227513?

Thanks

George
    This topic has been closed for replies.

    2 replies

    Inspiring
    January 6, 2009
    Ian Skinner wrote:
    >
    > Make the field an appropriate text type and the database will stop
    > interpreting your number in scientific notation.

    I just realize that your original post was from the database to Excel.
    I read it the other way the first time. The advice is still the same,
    make the excel cell a text cell not a number cell and it will not try to
    display your number in scientific notation.
    Inspiring
    January 6, 2009
    GeorgeWS wrote:
    > I have a UPC number like 0721059227513 when i output it to Excel it ends up like this: 7.21059E+11 in the SQL DB the feild is a char. How can I keep it looking like: 0721059227513?
    >
    > Thanks
    >
    > George

    Don't store it as a number. It does not need to be a number unless you
    plan to do math on it. For things like UPC ids what you have is a piece
    of text that just happens to be completely made up of digit characters.

    Make the field an appropriate text type and the database will stop
    interpreting your number in scientific notation.