Export number with leading zero to Excel

George Simon GSimon at americanriverintl.com
Thu Nov 30 08:46:06 PST 2006


Robert, maybe you could just format the cell with a custom format of
00000000 or whatever length you need the field to be, then any number
going into that cell will have the leading zeros.  You don't even have
to provide the leading zeros in your export file.  If you just need the
specific number of leading zeros that show on the import file, then this
will not work as it will always fill the field with leading zeros.

  
George Simon Sr. Programmer
Information Technologies
American River International

 

-----Original Message-----
From: filepro-list-bounces+george=worldest.com at lists.celestial.com
[mailto:filepro-list-bounces+george=worldest.com at lists.celestial.com] On
Behalf Of Robert T. Repko (R Squared Consultants)
Sent: Wednesday, November 29, 2006 9:16 PM
To: filepro-list at lists.celestial.com
Subject: RE: Export number with leading zero to Excel

Believe it or not at 11/29/2006 06:27 PM, Robert Haussmann said:
> > I am trying to export data to a comma delimited ASCII file for
> > importing into Excel.  I can export the data to a file but when I
> > open the file in Excel the leading 0 of any number is dropped.  In
> > Excel if I precede a number with an apostrophe (') when I am
entering
> > numbers the leading zero appears but not the apostrophe.  If I
> > precede the number with an apostrophe during the export the
> > apostrophe appears with the number in Excel.
> >
> > How can I keep the leading zero when I open in Excel.
> >
>
>Robert--this can be done during the import process in Excel.  During
>step #3 of importing a text file, you should see a "Data preview"
window.
>Click the column(s) of those columns in which you want to maintain
>leading zeros, and set the type to "text" (the default is "general").
>
>Bob Haussmann
>Tabor Children's Services, Inc.

Thanks Bob, that does keep the leading 0.  I would like to allow them 
to simply double click on the csv file to open it in Excel but this 
will probably have to do.
************************************************************************
***
* Robert T. Repko - R Squared Consultants   |   Voice: (610) 253-2849
*
* Serving the Computing World for 20+ years |     Fax: (610) 253-0725
*
* Windows/Unix Networking, Cisco, Sonicwall |   email: rtr at
rsquared.com*
* NJDOE Provider ID#: 763                   | Address: 4 Juniper Ave.
*
* SPIN: 143010681                           |          Easton, PA 18045
*
************************************************************************
***

_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list


More information about the Filepro-list mailing list