Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Saving a csv file with out dropping 0

Hi All,

Does any one know of a clever way to save an excel file as a csv file with
out dropping 0 values.

For example i have several columns of data one being a product code. A
product code is 0145 and i need all four digits to be saved to import into
our accounts software (Exchequer)

Many thanks in advance for any help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Saving a csv file with out dropping 0

Maybe the 0's didn't get dropped.

If you save the file as a .CSV and then use NotePad to look at the data, do you
see the 0's?

(You will lose them if you open that .csv file in excel.)

mike wrote:

Hi All,

Does any one know of a clever way to save an excel file as a csv file with
out dropping 0 values.

For example i have several columns of data one being a product code. A
product code is 0145 and i need all four digits to be saved to import into
our accounts software (Exchequer)

Many thanks in advance for any help.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Saving a csv file with out dropping 0

Hi Dave,

Have just done a test and your spot on the 0 values are there when opened in
note pad. However i need to get the csv file into excel to do some coverting
on the actual data. Any thoughts??

"Dave Peterson" wrote:

Maybe the 0's didn't get dropped.

If you save the file as a .CSV and then use NotePad to look at the data, do you
see the 0's?

(You will lose them if you open that .csv file in excel.)

mike wrote:

Hi All,

Does any one know of a clever way to save an excel file as a csv file with
out dropping 0 values.

For example i have several columns of data one being a product code. A
product code is 0145 and i need all four digits to be saved to import into
our accounts software (Exchequer)

Many thanks in advance for any help.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Saving a csv file with out dropping 0

Two options.
Either rename your csv to .txt and then the text import wizard will allow
you to specify text as the format of the relevant columns, ...
or you can open your csv with Data/ Import External Data, rather than File/
Open, and again you'll get the text import wizard.
--
David Biddulph

"mike" wrote in message
...
Hi Dave,

Have just done a test and your spot on the 0 values are there when opened
in
note pad. However i need to get the csv file into excel to do some
coverting
on the actual data. Any thoughts??

"Dave Peterson" wrote:

Maybe the 0's didn't get dropped.

If you save the file as a .CSV and then use NotePad to look at the data,
do you
see the 0's?

(You will lose them if you open that .csv file in excel.)

mike wrote:

Hi All,

Does any one know of a clever way to save an excel file as a csv file
with
out dropping 0 values.

For example i have several columns of data one being a product code. A
product code is 0145 and i need all four digits to be saved to import
into
our accounts software (Exchequer)

Many thanks in advance for any help.


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Saving a csv file with out dropping 0

Another way is to put some character in front of the 0 before you save
the .csv file, eg "_" or "~". It is then an easy task when you open
the csv file to get rid of these characters, either using
RIGHT(A1,LEN(A1)-1) if you want the number retained as text or you can
do Find & Replace, and then apply a custom format to the cells to show
the leading zeros (as they will be numbers with this method).

Hope this helps.

Pete

On Aug 22, 3:45 pm, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
Two options.
Either rename your csv to .txt and then the text import wizard will allow
you to specify text as the format of the relevant columns, ...
or you can open your csv with Data/ Import External Data, rather than File/
Open, and again you'll get the text import wizard.
--
David Biddulph

"mike" wrote in message

...



Hi Dave,


Have just done a test and your spot on the 0 values are there when opened
in
note pad. However i need to get the csv file into excel to do some
coverting
on the actual data. Any thoughts??


"Dave Peterson" wrote:


Maybe the 0's didn't get dropped.


If you save the file as a .CSV and then use NotePad to look at the data,
do you
see the 0's?


(You will lose them if you open that .csv file in excel.)


mike wrote:


Hi All,


Does any one know of a clever way to save an excel file as a csv file
with
out dropping 0 values.


For example i have several columns of data one being a product code. A
product code is 0145 and i need all four digits to be saved to import
into
our accounts software (Exchequer)


Many thanks in advance for any help.


--


Dave Peterson- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Saving a csv file with out dropping 0

Or bring the values in and lose the leading 0's, but then apply a custom format
to put them back.

Pete_UK wrote:

Another way is to put some character in front of the 0 before you save
the .csv file, eg "_" or "~". It is then an easy task when you open
the csv file to get rid of these characters, either using
RIGHT(A1,LEN(A1)-1) if you want the number retained as text or you can
do Find & Replace, and then apply a custom format to the cells to show
the leading zeros (as they will be numbers with this method).

Hope this helps.

Pete

On Aug 22, 3:45 pm, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
Two options.
Either rename your csv to .txt and then the text import wizard will allow
you to specify text as the format of the relevant columns, ...
or you can open your csv with Data/ Import External Data, rather than File/
Open, and again you'll get the text import wizard.
--
David Biddulph

"mike" wrote in message

...



Hi Dave,


Have just done a test and your spot on the 0 values are there when opened
in
note pad. However i need to get the csv file into excel to do some
coverting
on the actual data. Any thoughts??


"Dave Peterson" wrote:


Maybe the 0's didn't get dropped.


If you save the file as a .CSV and then use NotePad to look at the data,
do you
see the 0's?


(You will lose them if you open that .csv file in excel.)


mike wrote:


Hi All,


Does any one know of a clever way to save an excel file as a csv file
with
out dropping 0 values.


For example i have several columns of data one being a product code. A
product code is 0145 and i need all four digits to be saved to import
into
our accounts software (Exchequer)


Many thanks in advance for any help.


--


Dave Peterson- Hide quoted text -


- Show quoted text -


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Saving a csv file with out dropping 0

Good point, Dave, though if I have numbers where leading zeros are
important (phone numbers, stock codes etc) I tend to treat them as
text, as one wouldn't normally want to do any arithmetic on them. I
don't like the way Excel treats .csv files, and always change them
to .txt so I have control over the import. In my post I just informed
the OP of the consequences of using Find & Replace instead of the
formula if he/she sticks another character in front of the "numbers".

Pete

On Aug 22, 6:09 pm, Dave Peterson wrote:
Or bring the values in and lose the leading 0's, but then apply a custom format
to put them back.





Pete_UK wrote:

Another way is to put some character in front of the 0 before you save
the .csv file, eg "_" or "~". It is then an easy task when you open
the csv file to get rid of these characters, either using
RIGHT(A1,LEN(A1)-1) if you want the number retained as text or you can
do Find & Replace, and then apply a custom format to the cells to show
the leading zeros (as they will be numbers with this method).


Hope this helps.


Pete


On Aug 22, 3:45 pm, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
Two options.
Either rename your csv to .txt and then the text import wizard will allow
you to specify text as the format of the relevant columns, ...
or you can open your csv with Data/ Import External Data, rather than File/
Open, and again you'll get the text import wizard.
--
David Biddulph


"mike" wrote in message


...


Hi Dave,


Have just done a test and your spot on the 0 values are there when opened
in
note pad. However i need to get the csv file into excel to do some
coverting
on the actual data. Any thoughts??


"Dave Peterson" wrote:


Maybe the 0's didn't get dropped.


If you save the file as a .CSV and then use NotePad to look at the data,
do you
see the 0's?


(You will lose them if you open that .csv file in excel.)


mike wrote:


Hi All,


Does any one know of a clever way to save an excel file as a csv file
with
out dropping 0 values.


For example i have several columns of data one being a product code. A
product code is 0145 and i need all four digits to be saved to import
into
our accounts software (Exchequer)


Many thanks in advance for any help.


--


Dave Peterson- Hide quoted text -


- Show quoted text -


--

Dave Peterson- Hide quoted text -

- Show quoted text -



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
Converting xls to CSV file - dropping leading 0s vanjohnson Excel Discussion (Misc queries) 1 July 5th 06 07:47 PM
Text file saving, setting file origin mauddib Excel Discussion (Misc queries) 0 May 25th 06 02:50 PM
Excel should let me sort the file directory when saving a file Beanee70 Excel Discussion (Misc queries) 0 March 14th 06 07:03 AM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
Excel file saved as csv - dropping zeros Kathy Excel Discussion (Misc queries) 3 February 18th 05 07:15 PM


All times are GMT +1. The time now is 08:38 AM.

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"