xls结尾的excel连接字符为
mmconn="provider=microsoft.jet.oledb.4.0;Extended Properties='Excel 8.0;HDR=YES;IMEX=2';data source=文件地址"
xlsx结尾的excel连接字符为
mmconn=provider=microsoft.ace.oledb.12.0;Extended Properties='Excel 12.0;HDR=YES;IMEX=2';data source=文件地址
其中IMEX=1表示对excel只读,IMEX=2表示对excel可读写。
|