Solved

Keeping a column with numbers from converting to scientific notation

Posted on 2013-10-30
3
1,514 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 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

12 Experts available now in Live!

Get 1:1 Help Now