ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   converting (https://www.excelbanter.com/excel-discussion-misc-queries/172639-converting.html)

csmith

converting
 
I have placed leading zero in my excel doc and try to save as CSV file it
drops my leading zero even when I put the leading zero back into the CSV file
it will not save. Any suggestions?
--
csmith

Ag

converting
 
If you format that cell as text instead of number it will not drop
leading 0

Regards
Anirudh

On Jan 11, 7:53*pm, csmith wrote:
I have placed leading zero in my excel doc and try to save as CSV file it
drops my leading zero even when I put the leading zero back into the CSV file
it will not save. Any suggestions?
--
csmith



Soundar

converting
 
Hi,

Please refer the below link

http://exceltips.vitalnews.com/Pages...CSV_Files.html

You will get clear idea.

Thanks,
Soundar.

"csmith" wrote:

I have placed leading zero in my excel doc and try to save as CSV file it
drops my leading zero even when I put the leading zero back into the CSV file
it will not save. Any suggestions?
--
csmith


David Biddulph[_2_]

converting
 
I think you are confused. If you have a leading zero and you save as CSV,
then I would be pretty confident that the leading zero will still be there
in your CSV. I would suggest that you open your newly-saved CSV with
Notepad to check.
The problem arises if you try to read your CSV with Excel, either by
double-clicking in the CSV or by File/ Open. Going through that route,
Excel will decide that the incoming text is a number, and automatically
remove the leading zeroes. If you want to keep the leading zeroes you need
to treat the incoming number as text, which the text import wizard allows
you to do. To impose the text import wizard, either rename your .csv as
..txt before trying to open it, or open the CSV from within Excel by using
Data/ Import External Data.
--
David Biddulph

"csmith" wrote in message
...
I have placed leading zero in my excel doc and try to save as CSV file it
drops my leading zero even when I put the leading zero back into the CSV
file
it will not save. Any suggestions?
--
csmith




Dave Peterson

converting
 
Don't reopen the .csv file in excel. That's what's losing the leading zeros.

Use Notepad to verify that your .csv file is correct.

csmith wrote:

I have placed leading zero in my excel doc and try to save as CSV file it
drops my leading zero even when I put the leading zero back into the CSV file
it will not save. Any suggestions?
--
csmith


--

Dave Peterson

Leslie W.

converting
 
I have had this same problem in the past.

Data Get External Data From Text

Then you can pull in your .CSV file. It will walk you through on how you
want your text to be imported (how it understands columns, either delimited
or Fixed Width). After that, you can tell it how to interpret the data type
of the column. Change that to "Text." Then, it will import as text and keep
the leading zeroes.

I haven't had good luck with changing the column type to text in Excel, that
was the only way I was able to pull it off.

Good luck.

"Dave Peterson" wrote:

Don't reopen the .csv file in excel. That's what's losing the leading zeros.

Use Notepad to verify that your .csv file is correct.

csmith wrote:

I have placed leading zero in my excel doc and try to save as CSV file it
drops my leading zero even when I put the leading zero back into the CSV file
it will not save. Any suggestions?
--
csmith


--

Dave Peterson



All times are GMT +1. The time now is 02:38 PM.

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