Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Keeping a column with numbers from converting to scientific notation

Posted on 2013-10-30
3
Medium Priority
?
2,376 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 1000 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 1000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

824 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