Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Lisa
 
Posts: n/a
Default csv file drops zeros at beginning of a set of Numbers

I have programs that only import the csv format. When I create the file with
a text field using number such as 0101, 0321 if I close and reopen the file
it drops the zero. How do I correct this?
  #2   Report Post  
Nick Hodge
 
Posts: n/a
Default

Lisa

Three ways

1) If all the 'numbers' are the same length (4 characters) then via
FormatCells...NumberCustom, type 0000
2) Pre-format the cells to text and it will retain the leading zeroes.
3) rename the file with no extension or a *.txt one and then when you open
it Excel will invoke the import wizard, choose delimited, comma and then in
the third stage of the wizard, mark the offending column(s) as text

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Lisa" wrote in message
...
I have programs that only import the csv format. When I create the file
with
a text field using number such as 0101, 0321 if I close and reopen the
file
it drops the zero. How do I correct this?



  #3   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Lisa,

It probably isn't dropping the zeroes when it writes the csv file, but when
you reopen it with Excel. Go to www.smokeylake.com/excel. Go to "Very
Frequently Asked Questions (VFAQ)" and look at "TEXT FILE -- SAVING -- DATA
GETS CHANGED."

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Lisa" wrote in message
...
I have programs that only import the csv format. When I create the file
with
a text field using number such as 0101, 0321 if I close and reopen the
file
it drops the zero. How do I correct this?



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
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
File asks to update when no links were created Dave Links and Linking in Excel 1 December 16th 04 08:10 PM
File is locked for Editing by user problem Mirth Excel Discussion (Misc queries) 1 December 3rd 04 04:45 PM
format question when open csv file Jeff Excel Discussion (Misc queries) 1 December 1st 04 06:53 PM
Convert text file to MS_Excel Aqua Flow Excel Discussion (Misc queries) 1 November 30th 04 02:55 AM


All times are GMT +1. The time now is 07:02 AM.

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

About Us

"It's about Microsoft Excel"