If the output in Excel to specify such a line

ExcelServer.AutomationServer.Cells[k, col+1] := '01/01' 

Then in Excel it translates into a date.

How to make this happen?

  • one
    Before this assignment, set the cell format to text. How it will be there in excel'vski - I do not remember, look at help. - alexlz

2 answers 2

Quotation before the value set try:

 ExcelServer.AutomationServer.Cells[k, col+1] := '''01/01' 
  • Thanks for the direction you had to put 4 quotes in front)) - Vahan Av

Option: before inserting to set the format of cells Text .

  • Too easy)) I tried to change all the same. And the correct solution is already there. - Vahan Av
  • The simpler, the simpler :) And the right decisions may not be one. - vikttur