English date format while exporting data can't be changed ?

R

Roy Rutten

Hello all,

From my Delphi application I export data in text form. I use Delphi 7 and
Office 2003. My PC uses 'dd-mm-yyyy' as ShortDateFormat. Not only in
"Regional and language options" is this the case, I also explicitly set this
setting in my programm (it addresses the same setting).

The problem now is that when I export a date (in text format) like
"13-1-2005", Excel sees this as an error (green triangle in cell). Excel
doesn't recognize it as a date, whereas "12-1-2005" is recognized, and does
represent 12 jan 2005, as it should. Obviously it does not use the
configured date format at the moment of export, it uses something like
'mm-dd-yyyy'. However, clicking on the cell with a "wrong date" so that the
cursor appears, followed by pressing the enter key makes Excel see it as a
correct date.

I tried formatting the cells in the correct date format, this however
doesn't help either.

I use early binding, the used objects in delphi don't seem to include some
kind of date format setting.

Is there a way to make this work ??

Thanks in advance !

Regards,

Roy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top