Importing long numerical identifiers into Excel
Posted
by
Niels Basjes
on Super User
See other posts from Super User
or by Niels Basjes
Published on 2012-10-03T21:29:53Z
Indexed on
2012/10/03
21:42 UTC
Read the original article
Hit count: 269
I have some data in a database that uses ids that have the form of 16 digit numbers. In some situations i need to export the data in such a way that it can be manipulated in excel.
So i export the data into a file and import it into excel.
I've tried several file formats and I'm stuck.
The problem I'm facing is that when reading a file into excel that has a cell that looks like a number then excel treats it as a number.
The catch is that (as far as i can tell) all numerical values in excel are double precision floating point which have a precision of less than 16 digits. So my ids are changed: very often the last digit its changed to a 0.
So far I've only been able to convince excel to keep the Id unchanged by breaking it myself: by adding a letter or symbol to the Id. This however means that in order to use the value again it must be "unbroken".
Is there a way to create a file where i can specify that excel must treat the value as a text without changing the value? Or its there a way to let excel treat the value as a long (64bit integer)?
© Super User or respective owner