View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rohan Khan Rohan Khan is offline
external usenet poster
 
Posts: 1
Default Number formats in CSV files

Have you tried putting dittos (") around each field..
eg. "00392"
-----Original Message-----
I have a little confusion with number formats in CSV

files created
/processed in VB. Using a custom number format 00000 I

get numbers such as
00392 to display OK when in an xls file and when saved as

a CSV file these
numbers display OK immediatley before saving then using a

text editor on the
file they appear to be OK in the saved file. However when

the CSV file is
reopened in excel the number format is lost and appears

as 392 rather than
00392. This also happens when the number is input

as '00392 rather than
just using the custom format..

Can you explain what is happening here and what do you

think external
systems will do with these numbers? Is there any way to

maintain the 00000
formats?

Mervyn


.