Reading from test.csv file

G

Galsaba

I have the folowing test.csv file:

ENTITY","INTEREST ","AMOUNT "
"CSD01"," 1.4567","3,456.1234"

"CSD01","456.1234"," 1.4567 "

When I open it with excel, the number 3,456.1234
becomes 3,456.12
The number 456.1234 is the same in excel.
I do not want to change anything on the excel setting,
ie, if one wants to open my test.csv file using his excel, he will not
need to do any setting changes, and he still be able to see the entire number.

Is there a way to solve it?

Thanks,

Joe
 
L

Lady Layla

Looks like all he needs to do is expand the column that the 3456.1234 is in


: I have the folowing test.csv file:
:
: ENTITY","INTEREST ","AMOUNT "
: "CSD01"," 1.4567","3,456.1234"
:
: "CSD01","456.1234"," 1.4567 "
:
: When I open it with excel, the number 3,456.1234
: becomes 3,456.12
: The number 456.1234 is the same in excel.
: I do not want to change anything on the excel setting,
: ie, if one wants to open my test.csv file using his excel, he will not
: need to do any setting changes, and he still be able to see the entire number.
:
: Is there a way to solve it?
:
: Thanks,
:
: Joe
:
:
 
K

kkknie

Odd!

Not sure if you are getting the same thing, but what seems to hav
happened when I tried was that Excel chose an number format with tw
decimals. The next two places are there, but not shown. This mos
probably has to do with the comma in your number.

If you can get the value in your .csv file to eliminate the commas, i
should work. Otherwise, you will need to change the format of th
cells to general after importing (which I don't think you said yo
wanted to do).
 
G

Galsaba

Lady Layla,

I am not sure if you tried it before you posted your answer. I tried your
suggstion, it did not work for me. Did it work for u?
 
P

Peo Sjoblom

What does it say in the formula bar, if it is correct there change format to
4 decimals
or use general format..
 
C

Craig

Lady Layla said:
Looks like all he needs to do is expand the column that the 3456.1234 is in


: I have the folowing test.csv file:
:
: ENTITY","INTEREST ","AMOUNT "
: "CSD01"," 1.4567","3,456.1234"
:
: "CSD01","456.1234"," 1.4567 "
:
: When I open it with excel, the number 3,456.1234
: becomes 3,456.12
: The number 456.1234 is the same in excel.
: I do not want to change anything on the excel setting,
: ie, if one wants to open my test.csv file using his excel, he will not
: need to do any setting changes, and he still be able to see the entire number.
:
: Is there a way to solve it?
:
: Thanks,
:
: Joe
:
:

Because of the comma Excel interprets 3,456.1234 as a number and
assigns a Numeric formatting to it. If it were saved in the csv file
as 3456.1234 Excel would apply the General format to it and present
all decimal places.

My guess would be that the numbers in the csv file are saved with two
different data types; for Interest and Amount.

Hope this helps.
 

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