You apply that as a style to the specific cells.  Something like this
should work:

<td style="mso-number-format:'\@'">00001</td>



-----Original Message-----
From: Deetra Whatley [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 04, 2008 10:43 AM
To: CF-Talk
Subject: How do I export numerical data into Excel and keep the leading
zeroes from disappearing

When I export a file into Excel, the leading zeroes disappear. How do
you force Excel to treat the codes as text, and leave the zeroes? I need
something that would act the way the Excel text import wizard does. I've
tried enclosing the variable with single or double quotes, which sorta
work, except that the quotes show up in Excel along with the zeroes. 

I have used a couple of custom tags, but they are not preserving the
leading zeroes so the text is importing into Excel with no leading
zeroes. 

For example (From CF: 0000 Import into Excel: 0)

FYI: I read an answer using the mso-number-format:\@ style, but I am not
sure how/where to apply this style in my coldfusion code so that the
Excel spreadsheet reads 0000 instead of 0. 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298074
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to