Solved

Keeping a column with numbers from converting to scientific notation

Posted on 2013-10-30
3
2,085 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

632 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