Stopping Excel converting 1/02 to a date

M

Mark Macrae

I have a requirement to create a text file with a .XLS
extension to allow the user to open the file by
association but there is a column of data that has the
format 1/02.

When I create a delimited text file with the .XLS
extension Excel converts 1/02 to a date of 01-Feb.

Is there any way to prevent this conversion and leave the
data as 1/02?

I know that you can add a ' before the text but this is
then also displayed where the user only wants to see 1/02
in the cell but as a text value.

Any help would be greatly appreciated.
 
F

Frank Kabel

Hi Mark
two ways:
- precede your entry with an apostrophe. e.g. '1/02
- preformat the cell as 'Text' (goto 'format - Cells')
 
M

Mark Macrae

As I said in my message

I am aware of the two ways you suggest but that does not
help me as I am creating the .xls file from an Oracle
report. The user will then open the file I produce in
Excel and therefore has no way of pre formating the data
or the cell.

Mark
 
F

Frank Kabel

Hi Mark
not sure about Oracle exporting to Excel but during this export you may
have the possibility to set this filed as 'Text'
 
Top