Execlcon. Connected:=false;
Execlcon. Close;
Execlcon. The ConnectionString:='. The Provider=Microsoft Jet. The OLEDB. 4.0; Data Source='+ OpenDialog1. The FileName +'; Extended Properties="Excel 8.0; HDR=Yes; IMEX=1 "; Persist Security Info=False ';//
Execlcon. Connected:=true;
Note: an error is detected EOleException, invalid and quantity!
Should be Extended Properties="Excel 8.0; HDR=Yes; IMEX=1 ";
This one problem,
I find the Internet for a long time did not find how to define
CodePudding user response:
Execlcon. Connected:=false;
Execlcon. The ConnectionString:='. The Provider=Microsoft Jet. The OLEDB. 4.0; Data Source='+ OpenDialog1. FileName +
'; Extended Properties="Excel 8.0; HDR=Yes; IMEX=1 "; Persist Security Info=False ';
Execlcon. Connected:=true;
//remember that file exists
CodePudding user response: