Solved

Excel import of text file

Posted on 2013-12-21
3
414 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 90

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 90

Expert Comment

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

.... Thinkpads_User
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel Error per WinZip Add-In 9 32
Thanks for the advise, but... 4 24
Gantt chart 2 19
Import data into excel from web page 10 28
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now