If you're using the HTML2EXCEL tag (or going straight through the COM object) to create your Excel file, there was a thread a few weeks back where I ran into this.
Basically you have to use the Excel COM object to create the file and in you output embed a non-printing character (CHR(3) was what I ended up using), then use the COM Object to do a replace, changing the CHR(3) with a single quote ('). This must be done from inside Excel itself, otherwise it doesn't work. If you need more, I can find the old thread. Hatton BEN MORRIS wrote: > List, > > I am looking for a way to show numeric values in a csv file preserving leading >zeros. For instance, say someone's ssn is "005353828" I want it to show up that way >instead of "5353828". Anyone out there have any nuggets of wisdom to do this in >excel? > > In last field in the below example (in MS Excel 97), the single quotes show along >with the leading zeros, the double quotes make no difference, the ="001" shows up as >desired when viewed, but the value is '="100"' so it might cause more trouble than it >is worth. Reformatting all of the fields as text won't do anything because it drops >the leading zeros from the value, it isn't a formatting issue. I couldn't find a way >to import the info manually, and specify a text qualifier. > > a,b,c,d,5,001,'001' > a,b,c,d,5,001,"001" > a,b,c,d,5,001,="001" > > gracias por adelantado > - Ben Morris > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm 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