Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
LeePotts
 
Posts: n/a
Default retain leading zeros when importing

I am importing several thousand records from a web based database into excel.
I have to combine some records and then dump the data into another database.
The dataset set contains part numbers with leading zeros.

How do I get Excel to retain the leading zeros? I've read numerous posts on
how to change the cell format to display a leading zero, however, the actual
cell value does not inlcude this zero and I need it retained for import into
the next database. I've tried saving the HTM as a text file and importing,
however, the file is not delimited and the cell lenght varies so this is a
non-starter.
  #2   Report Post  
Posted to microsoft.public.excel.misc
David McRitchie
 
Posts: n/a
Default retain leading zeros when importing

Hi Lee,
Change the file extension from .csv to .txt so that the text import wizard comes
up which will give you a chance to indicate that the column is to be text.

If that does not work then prefix the data with a letter, and remove the prefixed
letter form the column once in Excel after you set up the format the way you wnat it.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"LeePotts" wrote in message ...
I am importing several thousand records from a web based database into excel.
I have to combine some records and then dump the data into another database.
The dataset set contains part numbers with leading zeros.

How do I get Excel to retain the leading zeros? I've read numerous posts on
how to change the cell format to display a leading zero, however, the actual
cell value does not inlcude this zero and I need it retained for import into
the next database. I've tried saving the HTM as a text file and importing,
however, the file is not delimited and the cell lenght varies so this is a
non-starter.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spliting a number with leading zeros haitch2 Excel Discussion (Misc queries) 7 September 30th 05 12:09 AM
CSV File - Leading Zeros Floridagal Excel Discussion (Misc queries) 2 August 6th 05 12:34 AM
How do I force leading zeros in an Excel cell? EricKei Excel Discussion (Misc queries) 2 June 15th 05 08:28 PM
Leading zeros Paul Excel Discussion (Misc queries) 4 June 12th 05 04:04 AM
retain leading zeros in number format Jeff Excel Discussion (Misc queries) 5 February 22nd 05 09:24 PM


All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"