Solved

Excel import of text file

Posted on 2013-12-21
3
444 Views
Last Modified: 2013-12-21
When I open a text file (with separated fields) in Micrsoft Excel, it converts the number to something incorrect.

For example: The value 1189124350620307456 changes to 1.18912E+18. If I right click on the Excel field and 'Format Cell' and set the Category to 'Number' with Decimal places = 0,
it shows incorrect value 1189124350620300000.

So the original 1189124350620307456 changes to 1189124350620300000. Is there any way to fix this issue? screen
0
Comment
Question by:toooki
  • 2
3 Comments
 
LVL 93

Accepted Solution

by:
John Hurst earned 500 total points
ID: 39733941
It is not a function of the import, but results from the fact that the maximum number of digits in Excel is 15. So that is what you got here.

See the Microsoft Support article on this below.

http://support.microsoft.com/kb/269370

.... Thinkpads_User
0
 

Author Comment

by:toooki
ID: 39733953
Thank you.

Also later someone said:
I tested it myself now, and a 32-digit string is converted into a number like 1.23457E+17 automatically.

The workaround then (proven to work in Excel XP):
- rename the file to .txt
- in Excel, use File>Open to open it, this will call the text import wizard
- after answering a few questions about format (delimited) and separator (,) you'll reach the screen where you can specify the format for each column. If you specify text for the column with these long numbers they won't be converted and still look like a 32-digit number.

It worked. Thank you.
0
 
LVL 93

Expert Comment

by:John Hurst
ID: 39733960
@toooki - Thanks and I was happy to help.

.... Thinkpads_User
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

My experience with Windows 10 over a one year period and suggestions for smooth operation
Outlook Free & Paid Tools
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

777 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