delphi 查询excel
为什么我delphi 查询excel的时候, excel里有小三角的我怎么都查询不到呢???
conExcel.Close;
conExcel.Connected := False;
conExcel.ConnectionString := format('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;'
+'User ID=Admin;Password=;Extended Properties=''Excel 8.0;IMEX=1'';Persist Security Info=False',
[ed1F_DoorID.Text]);
try
conExcel.Connected := True;
except
on E: Exception do
begin
exit;
end;
end;
sSQL:='Select 客户编号,厨房新表号 +' From ['+vSheet+'] where 客户编号 is not null' ;
连接语句这样写
[解决办法]
http://hi.baidu.com/zkgis/blog/item/297883227f6c925f9922ede2.html
[解决办法]
conExcel.ConnectionString := format('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;'
+'User ID=Admin;Password=;Extended Properties=''Excel 8.0;HDR=Yes;IMEX=1'';Persist Security Info=False',
[ed1F_DoorID.Text]);