Solved

Keeping a column with numbers from converting to scientific notation

Posted on 2013-10-30
3
1,620 Views
Last Modified: 2013-10-31
Experts,

I have a column on an Excel spreadsheet that has 18 numbers in it. What is the best way to format the column and read it into SAS  so the numbers don't convert to scientific format?
0
Comment
Question by:morinia
3 Comments
 
LVL 12

Assisted Solution

by:Harry Lee
Harry Lee earned 250 total points
ID: 39613110
As long as the column is not in General format, it will not turn.

I'm not sure if your 18 digits long number is some sort of ID number or is it an amount.

If it is an amount, consider changing the column format to Number format with no decimal place.

If it is an ID number, consider changing the column format to Text.
0
 
LVL 14

Accepted Solution

by:
Aloysius Low earned 250 total points
ID: 39613114
do you mean the number has 18 digits?

SAS can't display a number more than 15 digits (some numbers with 15 digits can be displayed properly, some can't - can't remember the cutoff) properly, thus  it will use the scientific notation which inherently means a loss of accuracy... in fact, if you leave it to SAS, it will start displaying the scientific notation once the number has more than 12 digits...

for Excel, it appears they have the same constraint too - just tried on my Excel... thus not sure if the number you are seeing is a text? could you try to set the format of the column to text, instead of general or number, and attempt the import again? this will bring the numbers into SAS as text, but at least you get to keep everything...
0
 

Author Closing Comment

by:morinia
ID: 39614051
I noticed if I leave the column defined as numeric on the spreadsheet it imports OK.  As soon as I try to convert to text some of the numbers convert to scientific notation.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now