I read dozens of posts about this, but I can't get it to work. I am importing an address spreadsheet. The Postal Codes column contains a combination of 5-digit postal codes, 9-digit postal codes, and 5-4 postal codes (5 digits, dashes, and 4 digits). (I’m sorry that I am in the power of users, and this is not something that I can control).
But no matter what I do, I can not get them all to import through OLEDB. Region 5-4 is always imported as null.
In HKEY_LOCAL_MACHINE \ SOFTWARE [Wow6432Node] Microsoft \ Jet \ 4.0 \ Engines \
ExcelImportMixedTypes=Text
TypeGuessRows=0
I tried both 32-bit and 64-bit mode. Input tables are in .XLS format (sorry, I am at the mercy of users whom I cannot force them to update).
Here is my connection string.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strServerFileName + ";Mode=Read;Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1
I will gladly publish the table if this helps.
OLEDB from my experience is EXTREMELY unreliable. Is there any other way to import Excel worksheets that work reliably?
source
share