Value of the parameter HDR:
Hdr=yes, this means that the first row is the title, not for data use, if you use hdr=no, it means that the first row is not a title, as data to use.
The system defaults to Yes
Parameter Excel 8.0
Excel 8.0 for all versions of Excel 97
IMEX (IMport EXport mode) Setup
There are three modes of IMEX:
Copy Code code as follows:
0 is Export mode
1 is Import mode
2 is linked mode (full update capabilities)
What I specifically want to illustrate here is the IMEX parameter, because different patterns represent different reading and writing behaviors:
Copy Code code as follows:
When imex=0 is "outbound mode", the Excel file opened in this mode can only be used for "write" purposes.
When Imex=1 is an "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 meaning is as follows:
Copy Code code as follows:
0-Output mode;
1-Input mode;
2--link mode (full update capability)
Copy Code code as follows:
ConnStr = "provider=microsoft.ace.oledb.12.0;
Persist security Info=false;data source= "&database&";
Extended Properties=excel 8.0; Hdr=yes;imex=2 ";
In this case, it is possible that "no installable ISAM can be found."
The most important reason for this problem is that there are fewer elements in our statement.
Copy Code code as follows:
ConnStr = "provider=microsoft.ace.oledb.12.0;
Persist security Info=false;data source= "&database&";
Extended properties= ' Excel 8.0; Hdr=yes;imex=2 ' ";
Copy Code code as follows:
ConnStr = "provider=microsoft.ace.oledb.12.0;
Persist security Info=false;data source= "&database&";
Extended properties=/"Excel 8.0; hdr=yes;imex=2/"";
Both of these situations can be resolved.