Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 127
Default leading zero & .csv files

I have an exported .csv file which one of the fields has leading zero. I
know that when I open the file the zero disappear. I have to open the file
to edit another field with the correct info. When I do this I lose the
leading zero, because I have to re-import this file. It can only be imported
as a .csv file. I know how to use format - style - custom - click on the
zero - add the correct number of zero. I get the right number 001 instead of
1. I had saved the csv as a .xls made the charges using the format - style -
etc. Then I saved it as .csv and didn't open the file and tried to import
and got the error. I open the file with notepad and it show correctly. I
tried to manually edit the file in notepad but this didn't help. Actually I
was using search and replace in note pad. How can I make the leading zero
stays? And yes I have to open the file to correct a different field after I
have exported the file to .csv.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default leading zero & .csv files

Hi

A possible option for you would be to change the file extension of the
file from .csv to .txt once it has been saved down, and then open it
up in Excel - you will get the TextImport wizard activating with which
you can specify that the fields should be opened up as Text (ie so no
dropping of the leading zeros). Perform all the required corrections
in the file, then save it down as a csv again.

Best regards

Richard


On 31 Dec, 01:28, klafert wrote:
I have an exported .csv file which one of the fields has leading zero. *I
know that when I open the file the zero disappear. *I have to open the file
to edit another field with the correct info. *When I do this I lose the
leading zero, because I have to re-import this file. *It can only be imported
as a .csv file. *I know how to use format - style - custom - click on the
zero - add the correct number of zero. *I get the right number 001 instead of
1. *I had saved the csv as a .xls made the charges using the format - style -
etc. *Then I saved it as .csv and didn't open the file and tried to import
and got the error. *I open the file with notepad and it show correctly. *I
tried to manually edit the file in notepad but this didn't help. *Actually I
was using search and replace in note pad. *How can I make the leading zero
stays? *And yes I have to open the file to correct a different field after I
have exported the file to .csv.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default leading zero & .csv files

An alternative is to open the CSV using Data/ Import External Data, rather
than with File/ Open or double-clicking the file.
The Data import route again invokes the wizard to allow the columns to be
specfied as text.
--
David Biddulph

"RichardSchollar" wrote in message
...
Hi

A possible option for you would be to change the file extension of the
file from .csv to .txt once it has been saved down, and then open it
up in Excel - you will get the TextImport wizard activating with which
you can specify that the fields should be opened up as Text (ie so no
dropping of the leading zeros). Perform all the required corrections
in the file, then save it down as a csv again.

Best regards

Richard


On 31 Dec, 01:28, klafert wrote:
I have an exported .csv file which one of the fields has leading zero. I
know that when I open the file the zero disappear. I have to open the file
to edit another field with the correct info. When I do this I lose the
leading zero, because I have to re-import this file. It can only be
imported
as a .csv file. I know how to use format - style - custom - click on the
zero - add the correct number of zero. I get the right number 001 instead
of
1. I had saved the csv as a .xls made the charges using the format -
style -
etc. Then I saved it as .csv and didn't open the file and tried to import
and got the error. I open the file with notepad and it show correctly. I
tried to manually edit the file in notepad but this didn't help. Actually
I
was using search and replace in note pad. How can I make the leading zero
stays? And yes I have to open the file to correct a different field after
I
have exported the file to .csv.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 127
Default leading zero & .csv files

Thanks so much and I should have thought of that. I am using notepad for
some of the conversions but didn't think of that. I will give it a try.

"RichardSchollar" wrote:

Hi

A possible option for you would be to change the file extension of the
file from .csv to .txt once it has been saved down, and then open it
up in Excel - you will get the TextImport wizard activating with which
you can specify that the fields should be opened up as Text (ie so no
dropping of the leading zeros). Perform all the required corrections
in the file, then save it down as a csv again.

Best regards

Richard


On 31 Dec, 01:28, klafert wrote:
I have an exported .csv file which one of the fields has leading zero. I
know that when I open the file the zero disappear. I have to open the file
to edit another field with the correct info. When I do this I lose the
leading zero, because I have to re-import this file. It can only be imported
as a .csv file. I know how to use format - style - custom - click on the
zero - add the correct number of zero. I get the right number 001 instead of
1. I had saved the csv as a .xls made the charges using the format - style -
etc. Then I saved it as .csv and didn't open the file and tried to import
and got the error. I open the file with notepad and it show correctly. I
tried to manually edit the file in notepad but this didn't help. Actually I
was using search and replace in note pad. How can I make the leading zero
stays? And yes I have to open the file to correct a different field after I
have exported the file to .csv.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 127
Default leading zero & .csv files

Thanks so much - hopefully you made my week work much easier so I can play
with my grandson.!!!

"David Biddulph" wrote:

An alternative is to open the CSV using Data/ Import External Data, rather
than with File/ Open or double-clicking the file.
The Data import route again invokes the wizard to allow the columns to be
specfied as text.
--
David Biddulph

"RichardSchollar" wrote in message
...
Hi

A possible option for you would be to change the file extension of the
file from .csv to .txt once it has been saved down, and then open it
up in Excel - you will get the TextImport wizard activating with which
you can specify that the fields should be opened up as Text (ie so no
dropping of the leading zeros). Perform all the required corrections
in the file, then save it down as a csv again.

Best regards

Richard


On 31 Dec, 01:28, klafert wrote:
I have an exported .csv file which one of the fields has leading zero. I
know that when I open the file the zero disappear. I have to open the file
to edit another field with the correct info. When I do this I lose the
leading zero, because I have to re-import this file. It can only be
imported
as a .csv file. I know how to use format - style - custom - click on the
zero - add the correct number of zero. I get the right number 001 instead
of
1. I had saved the csv as a .xls made the charges using the format -
style -
etc. Then I saved it as .csv and didn't open the file and tried to import
and got the error. I open the file with notepad and it show correctly. I
tried to manually edit the file in notepad but this didn't help. Actually
I
was using search and replace in note pad. How can I make the leading zero
stays? And yes I have to open the file to correct a different field after
I
have exported the file to .csv.




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
Add leading #'s to a value MikeD1224 Excel Discussion (Misc queries) 1 March 15th 07 11:09 PM
leading 0 (zero) MrA Excel Worksheet Functions 4 February 1st 07 01:01 PM
Leading Zeros in .CSV files klafert Excel Discussion (Misc queries) 8 August 30th 06 08:27 PM
Leading 0's exsam21 Excel Discussion (Misc queries) 5 January 20th 06 06:31 PM
add leading "0" blt Excel Worksheet Functions 4 August 27th 05 02:12 PM


All times are GMT +1. The time now is 04:04 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"