views:

17

answers:

0

Howdy,

I have a Microsoft Excel 2003 file that I am querying from C# 2.0 using an OleDbConnection.

One of the cells in the Excel file is formated as a short date and displays in Excel as "1/1/2009". If I change the format to General the text displayed in that cell changes to "39814".

If I query the Excel file while the file is open, I receive "39814" in the result set.

If I query the Excel file while the file is closed, I receive "1/1/2009" in the result set.

Why the inconsistency with importing data from this Ole Data Source?

Thank you,
Keith