convert number to text without losing zeroes

  • Thread starter Thread starter Guest
  • Start date Start date
Hey
dont open in Excel .
open with Notepad it will work fine...
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.
On Tuesday, September 25, 2007 6:27 PM Ron Coderre wrote:
One of the usual "fixes" is to change the file extension on the CSV file to
.TXT.

Then, when you open the file, Excel's Text Import Wizard will allow you to
set the delimiter to Comma and set the first column to be Text...which will
preserve the leading zeros.

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)


news:[email protected]...
On Tuesday, September 25, 2007 7:47 PM Ron Coderre wrote:
Sorry, I misunderstood your situation.

Perhaps this approach will work for you....

Make sure the Part Numbers not only *look* like text, but that the cells are
actually formatted as text.

Select the column of Part Numbers
<data><text-to-columns>...Click [Next] until Step_3_of_3
Check: Text (to set the column type)....Click [Finish]

Now try saving the file as a CSV

Does that help?
If no...can you post a sample file at one of the free file-hosting sites and
post the link for us?
http://www.flypicture.com/
http://cjoint.com/index.php
http://www.savefile.com/index.php

--------------------------

Regards,

Ron (XL2003, Win XP)
Microsoft MVP (Excel)



news:[email protected]...
 
Back
Top