I'm using the below Connection String with ACE.OLEDB.12.0 to read data from an XLSX Spreadsheet, but the I set IMEX=1, it does not work while when I remove IMEX=1 completely, it works fine.
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:Working FolderICDERamsden 4.xlsx;Extended Properties=""Excel 12.0 xml;HDR=No;IMEX=1;"""
Can anyone explain why?
Because I had the impression that IMEX=1 reads all data as text, so it was more secure!
Thanks
JP
IMEX= <0/1/2>
IMEX refers to IMport EXport mode. This can take three possible values.
IMEX=0 and IMEX=2 will result in ImportMixedTypes being ignored and the default value of ‘Majority Types’ is used. In this case, it will take the first 8 rows and then the data type for each column will be decided.
IMEX=1 is the only way to set the value of ImportMixedTypes as Text. Here, everything will be treated as text.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…