View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
timmg timmg is offline
external usenet poster
 
Posts: 10
Default Stop Excel changing CSV text into dates

On Jan 6, 10:03*am, "Paul E Collins"
wrote:
My application generates CSV data files. Users view these in Excel.

When a row of the CSV file contains the text 1-1, Excel incorrectly renders
it as a date (1 January).


Try padding a space in front, eg

test, alpha,123, 1-1
test2, beta,234, 1-1
t3,theta,3432, 1-1

The apostrophe is the ancient text indicator, but it reads as a " ' "
when you first open, but converts to invisible if you edit the cell.

HTH,

tim