Read Excel 2007 file with OLEDB using a specific culture

I am trying to read an excel 2007 file (using OLEDB) which has dates in British format. The server (sometimes) is installed in the US format, so the usual problems with the date format play in the game.

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 the file to always open using the en-GB culture. Is there a way to specify a culture using a connection string?

+3
source share
1 answer

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

0
source

Source: https://habr.com/ru/post/1743475/


All Articles