ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Saving a csv file with out dropping 0 (https://www.excelbanter.com/excel-worksheet-functions/155332-saving-csv-file-out-dropping-0-a.html)

Mike

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.

Dave Peterson

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

Mike

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


David Biddulph[_2_]

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




Pete_UK

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 -




Dave Peterson

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

Pete_UK

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 -





All times are GMT +1. The time now is 05:25 AM.

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