How to write a date to an excel cell? (RTD / C#)

D

Daniel

Hello,

I'm currently trying to find out how i can set a date value to an
excel cell.

Example:

public object ConnectData(int TopicID, ref Array Strings, ref bool
GetNewValues)
{
// ...
return new DateTime(1978, 10, 10);
}

The cell will show the excel's represention of a data as a double
value, but excel does not recognize it as a date. Is it possible i can
return a value excel automatically recognizes as a date with the
default date format? If i return a formatted date as string excel
treats it as string an not as a date.

Thanks alot.

Daniel
 

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