Read excel 2007 file with OLEDB using a specific culture

Posted by Derek Ekins on Stack Overflow See other posts from Stack Overflow or by Derek Ekins
Published on 2010-04-30T09:14:04Z Indexed on 2010/04/30 9:17 UTC
Read the original article Hit count: 468

Filed under:
|

I am trying to read an excel 2007 file (using OLEDB) that has dates in the UK format. The server is (sometimes) set to US format and so the normal date format problems are in play.

This is my connection string:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=myfile.xlsx;Extended Properties="Excel 12.0 Xml;HDR=NO;IMEX=1"

I want to ensure that the file is always opened using the en-GB culture. Is there a way to specify the culture using the connection string?

© Stack Overflow or respective owner

Related posts about excel-2007

Related posts about .NET