Hdr=yes imported from Excel; Imex=1 detailed
December 27, 2011 Tuesday 11:17
Value of the parameter HDR:
Hdr=yes, this means that the first row is the title, not as data use, if used Hdr=no, then the first row is not the title, as data to use. The system default is Yes
Parameter Excel 8.0
For Excel 97 or later, use Excel 8.0
IMEX (IMport EXport mode) settings
There are three modes of IMEX:
0 is Export mode
1 is Import mode
2 is Linked mode (full update capabilities)
What I want to highlight here is the IMEX parameter, because different patterns represent different reading and writing behaviors:
When imex=0 is "Export mode", the Excel file opened by this mode can only be used for "write" purposes.
When Imex=1 is "Import Mode", the Excel file opened in this mode can only be used for "read" purposes.
When imex=2 is "connected mode", the Excel file opened in this mode can support both "read" and "write" purposes.
The meanings are as follows:
0---output mode;
1---input mode;
2----link mode (full update capability)
The following content is for my own search and editing, belonging to a personal work.
String connstr = "provider=microsoft.ace.oledb.12.0; Persist Security info=false;data source= "+ @Excfilename +"; Extended Properties=excel 8.0; Hdr=yes;imex=2 ";
In this case, the "installable ISAM could not be found" may appear.
The most important reason for this problem is that there are fewer elements in our statement.
String connstr = "provider=microsoft.ace.oledb.12.0; Persist Security info=false;data source= "+ @Excfilename +"; Extended properties= ' Excel 8.0; Hdr=yes;imex=2 ' ";
String connstr = "provider=microsoft.ace.oledb.12.0; Persist Security info=false;data source= "+ @Excfilename +"; Extended properties=/"Excel 8.0; hdr=yes;imex=2/"";
Both of these cases can be resolved.
Hdr=yes about Excel import; Imex=1 detailed