View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
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