Solved

Excel import of text file

Posted on 2013-12-21
3
476 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
[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
  • 2
3 Comments
 
LVL 94

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 94

Expert Comment

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

.... Thinkpads_User
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
My experience with Windows 10 over a one year period and suggestions for smooth operation
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

726 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