[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


How to Stop Auto Format of Scientific Notation

Posted on 2010-09-03
Medium Priority
Last Modified: 2012-05-10
I periodically exporting csv file from one of our system. But when the numbers are downloaded the numbers are automatically converted to scientific notation and when perform a change format to "Numbers" with out decimal the numbers changes completely to a different number. Is there a fix for this or a code for this?

Question by:justmiracle78
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
LVL 24

Assisted Solution

Tracy earned 600 total points
ID: 33597594
>>when perform a change format to "Numbers" with out decimal the numbers changes completely to a different number.

I did this with your three numbers above and it worked fine.

See attached.

LVL 93

Accepted Solution

Patrick Matthews earned 1400 total points
ID: 33597619
justmiracle78,Excel has a maximum precision of 15 digits, so if you have an entry that "looks" numeric but which has >15 significant digits, you will suffer a loss of precision.  For example, the number:1234567890.123456will become:1234567890.12345and the number:1234567890123456will become:1234567890123450 (and likely display in scientific notation as 1.23457E+15 or similar)The only thing you can do is to try to import such values as text and not as numbers.Patrick
LVL 93

Expert Comment

by:Patrick Matthews
ID: 33597653
justmiracle78,BTW, there is no "conversion to scientific notation" going on here.  That is simply a number format applied to how the value is displayed, and has no effect on how Excel actually stores the number, or uses it in calculations.Patrick

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 93

Expert Comment

by:Patrick Matthews
ID: 33597693
justmiracle78,So, as above, the value you are importing, 2010041400081989, appears to be numeric, so Excel treats it like a number.  However, it has 16 significant digits, one more than Excel's limit.  Excel thus truncates the precision (but not the scale), and changes the value to 2010041400081980.Patrick

Author Comment

ID: 33597924
broomee9 - I actually did what you recommended and have changed the format to numbers but when it converts it does not return the correct number. The ending numbers changes to "0" zeros.

Patrick, I was hoping there was a solution for this but before posting this question I did a search on this problem and everyone has been saying the samething what you've said. I guess we'll request a change request to add an apostrophe in front of the numbers so it doesn't automatically change the numbers into scientific notations.

LVL 18

Expert Comment

by:Cory Vandenberg
ID: 33598069
I run into this constantly when bringing text files into Excel that were output by SAS.  As Patrick suggested, use Text format.  You don't need to prefix with an apostrophe, just change the format of the Transaction Ref. column to Text before importing the data (or during the import if that is an option such as with VBA code).
LVL 18

Expert Comment

by:Cory Vandenberg
ID: 33598150
Perfect example.

Column C was formatted to Text before Import, while Column O was not.  No need for apostrophe.

LVL 18

Expert Comment

by:Cory Vandenberg
ID: 33598163
Just in case, here is what I pasted into Excel, using Text To Columns to parse the PIPE delimiter.


Open in new window


Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

656 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