Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Leading Zero in .csv format

I've read all the post and blogs on csv files dropping leading zero's
and still haven't found a solution. I have Excel 2002 and when I save
file as .csv it drops the leading zero. I've tried formatting cells as
text before saving as csv, importing data with cells set as text,
under custom format my version of evcel doesn't have an option for
00000 or #0000. I was told that I need to upgrade to a newer version
of excel. Any help would be greatly appriciated..
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Leading Zero in .csv format

On Jan 18, 10:35*am, Dave Peterson wrote:
Don't open the .csv file in excel to check it.

Use NotePad--or some other text editor.

You'll find that the leading zeros are there.

Excel will remove them when you reopen the .csv file--not when excel saves it.

wrote:

I've read all the post and blogs on csv files dropping leading zero's
and still haven't found a solution. I have Excel 2002 and when I save
file as .csv it drops the leading zero. I've tried formatting cells as
text before saving as csv, importing data with cells set as text,
under custom format my version of evcel doesn't have an option for
00000 or #0000. I was told that I need to upgrade to a newer version
of excel. Any help would be greatly appriciated..


--

Dave Peterson


Okay, If I open the csv the zero is gone. If I open the file in
notepad the zero is present. Does that mean if I upload the csv file
to my database that the number will be whole and the zero present?

Thanks Dave..
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Leading Zero in .csv format

I would think it would depend on how your database importing works.



wrote:

<<snipped

Okay, If I open the csv the zero is gone. If I open the file in
notepad the zero is present. Does that mean if I upload the csv file
to my database that the number will be whole and the zero present?

Thanks Dave..


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Leading Zero in .csv format

Dave,

I'm having the same problem. Is there any way to make Excel open the
..csv file containing a
string of numeric characters with a leading 0, e.g., "03" , and have
it saved in a cell as text instead of
numeric?

TIA

Ed

"Dave Peterson" wrote in message
...
I would think it would depend on how your database importing works.



wrote:

<<snipped

Okay, If I open the csv the zero is gone. If I open the file in
notepad the zero is present. Does that mean if I upload the csv
file
to my database that the number will be whole and the zero present?

Thanks Dave..


--

Dave Peterson





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Leading Zero in .csv format

Rename the .csv file to .txt

When you do file|open, you'll be prompted in the text to columns wizard on how
each field should be treated. You can choose text for the fields that should
retain the leading 0's.

Alternatively, you could use:
Data|Import External data (xl2003 menu system) and follow that wizard.

Ed wrote:

Dave,

I'm having the same problem. Is there any way to make Excel open the
.csv file containing a
string of numeric characters with a leading 0, e.g., "03" , and have
it saved in a cell as text instead of
numeric?

TIA

Ed

"Dave Peterson" wrote in message
...
I would think it would depend on how your database importing works.



wrote:

<<snipped

Okay, If I open the csv the zero is gone. If I open the file in
notepad the zero is present. Does that mean if I upload the csv
file
to my database that the number will be whole and the zero present?

Thanks Dave..


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format to show leading zero lehigh46 Excel Worksheet Functions 5 February 25th 09 01:20 PM
Format for Leading Zeros DavidW[_7_] Excel Programming 5 April 19th 06 09:01 PM
How do I save a leading 0 in a csv format? Kathy Excel Worksheet Functions 2 February 16th 06 07:56 PM
number format with leading 0 Darby Excel Discussion (Misc queries) 3 November 22nd 05 03:37 PM
Format a cell to keep leading zeros. Shadyhosta New Users to Excel 5 July 27th 05 04:37 PM


All times are GMT +1. The time now is 01:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"