I'm doing a program that imports Excel into the database, This is my code:
var
importdir, ipo: string;
begin
if OpenDialog1.Execute then
begin
importdir := ExtractFileDir( OpenDialog1.FileName );
ipo := OpenDialog1.FileName;
end;
ADOConnection1.Execute( 'insert into archivo select * from [Excel 8.0; database='+ipo+'].hoja1' );
end;
When I select the file I get this error
The Microsoft Jet could not find the object 'leaf1' Make sure the object exists and the path is correct.