Excel Export: "3/2" gets read as a date?

I’m using LotusScript to create a spreadsheet, then mail it out.

Theres a text field that sometimes the value is “3/2” or “10/6”, etc.

In the Excel spreadsheet it get puts to the right of the column and formatted as a date “2-Mar” or “6-Oct”, etc.

Is there a way to format the excel cells to read it literally as a string.

(I don’t want to replace the slashes with backslashes or anything like that). Thanks.

Subject: Excel Export: “3/2” gets read as a date?

Hi,

Before assigning the value to the cell just change the format of that cell.

'select the particular cell

ExcelApp.Rows(“1:1”).Select

'change the format as text

ExcelApp.Selection.NumberFormat = “@”

'Assign the value

xlSheet.cells(row,col).Value = val

regards,

SK

Subject: RE: Excel Export: “3/2” gets read as a date?

I found another thread with a similar answer, but it wasn’t as clear as you’ve written it.

Thank you very much!!!