saving .xls to .csv


K

Karen Thomas

We are having problems saving excel spreadsheets to .csv files. It
appears that .csv files will only use the format cells > number >
general format, and we are losing decimal places of data. It appears
to be arbitary, but I know that can't be true. If we change the
format cells > number to number with 2 decimal places, we see that the
decimals are not really gone, just not visible. When we transfer data
from the .csv file to database tables the truncated, or sometimes
rounded?, data is lost.

Help!
 
Ad

Advertisements

M

Mark Adams

Karen Thomas said:
We are having problems saving excel spreadsheets to .csv files. It
appears that .csv files will only use the format cells > number >
general format, and we are losing decimal places of data. It appears
to be arbitary, but I know that can't be true. If we change the
format cells > number to number with 2 decimal places, we see that the
decimals are not really gone, just not visible. When we transfer data
from the .csv file to database tables the truncated, or sometimes
rounded?, data is lost.

Help!

Ever read the prompt that appears when saving a worksheet to excel?

This is taken from the helpfile that you are directed to...
<Quote>

The CSV (*.csv) file format saves only the text and values as they are
displayed in cells of the active worksheet. All rows and all characters in
each cell are saved. Columns of data are separated by commas, and each row
of data ends in a carriage return. If a cell contains a comma, the cell
contents are enclosed in double quotation marks."

<End Quote>

ie. If a number has 9 decimal places in excel, (9.123456789), but is
rounded to 2dp (9.12) via format, number, although any calcs in excel will
use the full 9dp number, when this is saved in csv format, the number value
is truncated to 2dp in any subsequent program that uses the csv values.

Mark
 
Ad

Advertisements

K

Karen Thomas

Mark - we are only talking about 2 dp that arbitrarily
turn up missing in in the .csv file, and ultimately
missing in our database.
 

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