Solved

Excel import of text file

Posted on 2013-12-21
3
516 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 96

Accepted Solution

by:
Experienced Member 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 96

Expert Comment

by:Experienced Member
ID: 39733960
@toooki - Thanks and I was happy to help.

.... Thinkpads_User
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
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 demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

630 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