data truncates when converting .csv to .xls

G

Guest

I receive every day an e-mail with a file with data in .csv format.
When opening this file as a .xls, a specific field with a 20 digit value,
gets truncated and last 5 digits appear as Cero.
(of course they were not Cero in the original .csv file)
in summary:
"23848730987391234598" is converted to --> "23848730987391200000"

can someone help?
than you
 
N

Norman Jones

Hi Sergio,

Try renaming the csv fie as a txt file. Then, when you open the renamed file
in Excel, rhe Data Import Wizard will be invoked. The wizard will enable you
to define the numeric field as text and all the digits will be displayed.
 
D

Dave Peterson

When you double click on that .csv file, you don't have any control over how
excel sees your data.

And excel will see that field as numeric and treat it that way. The bad news is
that excel only keeps track of up to 15 digits when dealing with numbers.

Try saving that attachment on my harddrive somewhere as .txt (not .csv).

Then open excel and do
File|Open (that .txt file)

You'll see the data import wizard pop up and you'll be able to specify Text for
this long numeric field. And as text, excel will keep all the digits as-is.
 
D

Dave Peterson

Please don't try this:

Try saving that attachment on my harddrive somewhere as .txt (not .csv).

But it's ok to save the attachment on YOUR harddrive!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top