Re: convert number to text without losing zeroes
- From: Pete_UK <pashurst@xxxxxxxxxxx>
- Date: Tue, 25 Sep 2007 15:38:55 -0700
Just check that the leadings zeros are not actually missing from
the .csv file by opening it in Notepad - you should be able to see the
format of the file more clearly there. If the part numbers are stored
in Excel as numbers and just formatted to have a leading zero, then
they will be missing from the csv file - a formula like:
=TEXT(A1,"000000")
will convert them to text values. You could fix these values then copy
them back over the offending cells.
If you are bringing the file into Excel then rename it by changing
the .csv extension to .txt. Then with Excel running do File | Open,
point to the .txt file and then Excel will take you into the Data
Import Wizard, where you have more control over how the fields are
treated.
Hope this helps.
Pete
On Sep 25, 11:22 pm, DaveK <Da...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I cannot find an answer to this problem anywhere, perhaps someone here can
help.
I have 2 columns of data that I pulled from my proprietary database using
ODBC. The first column is part numbers, and the second is a list price for
the part. The part numbers are a mix of numbers, letters, and some dashes.
I am saving this list to a .csv, uploading it to my web server, and then
logging in to my webserver and importing the data from the .csv to a mysql
database.
The problem is coming in when I have part numbers that start with zero. An
example would be 010888. The zero gets dropped off when I save it as a .csv.
I figured I could convert it to text and it would be fine but when I convert
it to text in excel it drops the zero too. A part number like 010888L is
fine because its treated like text and the zero remains through any
conversion.
Please help.. I have some 9000 part numbers that I need to save to a .csv
and 300 of them start with zero.
.
- Follow-Ups:
- Re: convert number to text without losing zeroes
- From: David Biddulph
- Re: convert number to text without losing zeroes
- From: DaveK
- Re: convert number to text without losing zeroes
- Prev by Date: Re: convert number to text without losing zeroes
- Next by Date: Re: convert number to text without losing zeroes
- Previous by thread: Re: convert number to text without losing zeroes
- Next by thread: Re: convert number to text without losing zeroes
- Index(es):
Relevant Pages
|