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

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). If users then format the cell as text, they don't
get 1-1 back but a useless number (the Excel numerical representation of 1
January).

How can Excel be made to open a CSV file (when the user launches that file
from Explorer) without screwing with it? It just needs to display the text
in the file and not try to "format" it. I could not find any suitable
setting in ToolsOptions, nor does placing various sets of quotes around the
1-1 appear to have any effect.

Eq.