If you open the file directly into excel, this happens. (I deal with a lot
of UPC's with leading zeros). However, if you open excel, then import text
file, you have the opportunity to tell it how to treat each column
(selecting text for your zip column) and everything is then cool.

All else fails, I put a single quote in front of the number. That's
Excel's internal notation that something is text and sometimes it works,
sometimes it leaves the quote there. I haven't figured out why.

> I am exporting some data to Excel and one of the
> fields is zip code. Excel is stripping all leading 0's
> (zeros) off of the zip codes. I need it to leave the
> zip code alone, i.e. treat it as text instead of a
> number. Any ideas anyone?
>
> So far, I have tried:
> 1) Using an obscure ASCII char in front of the zip.
> RESULT: Excel puts in a box when it encounters an
> ASCII char it does not understand
>
> 2) Enclosing the zip in both single quotes and double
> quotes.
> RESULT: Excel leaves the quotes in instead of treating
> them as a text qualifier
>
> 3) Looked at the Allaire forums, where I saw the same
> question asked but not answered.
>
> 4) Read up on Excel at cfcomet, but most things there
> are a little overkill for what I am trying to do.
>
> TIA,
>
> Nate
>
> =====
> ----------------------------
> Nathan Shaw
> Senior Web Applications Developer
> iaffect, Inc.
> http://www.iaffectonline.com
> ----------------------------
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to