Ali  Alfaraj

Ali Alfaraj

  • NA
  • 68
  • 108.3k

Export date from Excel to visual C# 2008

Jul 25 2011 7:19 AM
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)