ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   leading zeros fall off in csv format. (https://www.excelbanter.com/excel-discussion-misc-queries/172306-leading-zeros-fall-off-csv-format.html)

susanmarie

leading zeros fall off in csv format.
 
leading zeros fall off in csv format. I need to know if this is normal or if
I need to make a change to formatting or some other option .

Bob I

leading zeros fall off in csv format.
 
Open the CSV file with Notepad, are the leading zeros still there?

susanmarie wrote:
leading zeros fall off in csv format. I need to know if this is normal or if
I need to make a change to formatting or some other option .



JP[_4_]

leading zeros fall off in csv format.
 
Can you be more specific, i.e.

1. Are the zeros being dropped when you enter them and then leave the
cell? or,
2. Are the zeros being dropped when you (re)open the file or import it
in Excel or in another program?


Thx,
JP

On Jan 9, 1:50*pm, susanmarie
wrote:
leading zeros fall off in csv format. I need to know if this is normal or if
I need to make a change to formatting or some other option .



Gary''s Student

leading zeros fall off in csv format.
 
The leading zeros are dropped when the .csv file is opened, not when it is
created. You can verify this by openning the .csv with NotePad.

To preserve the leading zeros, don't open the .csv by double-click. Just
open Excel and:

Data Import External Data... Import Data and select the .csv from the
dialog.

The Import Wizard will allow you to specfy Text rather than General and thus
save the leading zeros.
--
Gary''s Student - gsnu200764


"susanmarie" wrote:

leading zeros fall off in csv format. I need to know if this is normal or if
I need to make a change to formatting or some other option .


David Biddulph[_2_]

leading zeros fall off in csv format.
 
Have you looked at the CSV with Notepad to see whether the leading zeroes
really have fallen off?

My guess is that they were there in the CSV, but that someone has tried to
open the file with Excel, and Excel has assumed on the import that they are
numbers and thus lost the leading zeroes at that stage. If you do want to
read a CSV in Excel, don't use File/ Open or double-click the CSV, but
instead in Excel use Data/ Import External Data ... then you'll get the Text
import wizard which will allow you to specify the column format as Text.
--
David Biddulph

"susanmarie" wrote in message
...
leading zeros fall off in csv format. I need to know if this is normal or
if
I need to make a change to formatting or some other option .





All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com