View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
CCusson15 CCusson15 is offline
external usenet poster
 
Posts: 3
Default Set datatype of a cell?

I'm creating an Excel spreadsheet from a DataTable. I've got the code all
working, but the data that I'm writing out for one particular column is
"001". Excel is truncating that value to be a number, so it only displays "1".

How can I set the datatype of the cell to Text, so it will preserve the
leading zeroes?

Thanks
Chris