View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DragonRider from Downunder DragonRider from Downunder is offline
external usenet poster
 
Posts: 1
Default On File open - how to stop conversion of postcodes to numbers

I have a CSV file I download regularly which on open within Excel converts
all numeric fields to numbers - when I do not want it to do so.

e.g. Postcodes can be "00037" appear as 37 which is not a valid US postcode
for printing to labels etc. As postcodes in Australia for example are only 4
digits I can not just replace the missing leading zeros by string
manipulation - as I do not know how many there should be. perhaps some
countries have 6 numbers in the postcode? I know UK have mix of numbers and
letters so they are OK as they appear as text.

When I open CSV file using Notepad the field contains "00037" so it is all
there in the Raw state of the file.

Surely there must be a way to open (without using complex open text file or
stream and complex record structures) a CSV file and control the bahaviour to
forbid it changing the field contents (ie. opening it as straight text or
ascii equivalent)?