4
Answers

Export date from Excel to visual C# 2008

Ali  Alfaraj

Ali Alfaraj

13y
1.9k
1
Greetings dear members,

I'm attempting to export a data with the type 'Date' from excel to a cell in datagridview in visual c# 2008 express edition (i.e. exporting '1/11/2010').
When I did that using the function:
xlWorkSheet.get_Range( , )

It did work, but the date was transffered as an integer: '40189' !!!

How can I prevent that from happening? How can I transfer data as it is formatted in excel???

Or How can I convert the integers '40189' into date formate within visual c# environment???

Thanks in advance,

Ali

Answers (4)