views:

109

answers:

1

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?

A: 

Try adding Locale Identifier=2057 to your connection-string. 2057 is en-gb. It may not work on your provider, but it's worth a shot.

Espo
Yeah we tried that one already. From the docs I have read it seems to indicate that "Local Identifier" is a JET setting, we are using the ACE driver as that is what supports Excel 2007 files.
Derek Ekins